Question about TDD structure

So to speak, I am doing TDD, and I am writing the test as follows:

public void testDeposit()
{
    Bank b = new Bank();
    b.deposit(100);
    AssertEquals(100, b.balance);
}

Then I go and pass the test, move on to the next. Let's say I do this several times in a row, and all the work associated with deposits, withdrawals and depreciation.

Then I will say that I want to write a test that checks, someone creates an account and does a combination of everything. Isn't it a technically integration test, not a unit test? If so, is it TDD compliant, or should the TDD consist only of unit tests.

I mostly ask because if this test breaks, most likely one of the other tests should break, and if they don't, I probably just didn't check them with the right number of scripts. So, should I have integration tests in the same domain as unit tests when it comes to TDD, or should they be written in another class / file somewhere else and run separately?

+5
source share
2 answers

, , , TDD. , "" . UI , , , .

, , , TDD.

+4

; TDD, "" , , TDD, , , "" ( ).

, " "; , TDD.

+2

All Articles