Strona głównaSztuka programowania

In previous post, I defined a good unit test as one that:tests single unit of workcontains only one assertis self contained Presented sample of code with one unit test, unfortunately had two asserts. Clear violation of the second rule. One of the fellow bloggers MJ pointed out this mistake. It is time to “fix” it and talk about “Only one assert per test” rule.Why only One Assert There are couple of problems with multiple asserts.Unit Test Misinformation Frameworks like NUnit do notify about failing un...

Tagi: unit-tests
Źródło: www.mfranc.com
Dziel się z innymi:
[EN]Good unit test - One Assert | Passionate Programmer

Sztuka programowania 4319 dni, 6 godzin, 38 minut temu michalfranc 37 pokaż kod licznika zwiń

Wczytywanie artykułów...