* You can pick and choose specific scenarios and test EXACTLY what you wanna test at a given moment.
* You get the shortest testing time since you don't have to "pre-run" the first scenario before running the overdraft scenario or You don't have to wait for the overdraft scenario to finish for to get the PASS from the first scenario.
Nice post, and I agree in general, but sometimes the issue is in chain of things, like in this case maybe after a failed attempt setting overdraft limit and re-try will not work. I would say check it in isolation and also have basic scenarios checked as well.
Thanks well done, took me some time for me to understand Usd(5); might be better to use Java Lib. improve readability: java.util.Currency usd = java.util.Currency.getInstance("USD");
As a general rule, Helper methods should be avoided because it scatters context. Duplicating the helper method body inside the test cases is Ok as it gives all the context necessary to understand the test case.
More benefits:
ReplyDelete* You can pick and choose specific scenarios and test EXACTLY what you wanna test at a given moment.
* You get the shortest testing time since you don't have to "pre-run" the first scenario before running the overdraft scenario or You don't have to wait for the overdraft scenario to finish for to get the PASS from the first scenario.
Nice post, and I agree in general, but sometimes the issue is in chain of things, like in this case maybe after a failed attempt setting overdraft limit and re-try will not work.
ReplyDeleteI would say check it in isolation and also have basic scenarios checked as well.
Thanks well done, took me some time for me to understand Usd(5); might be better to use Java Lib. improve readability:
ReplyDeletejava.util.Currency usd = java.util.Currency.getInstance("USD");
Nice post. Just the kind of information I was searching for.
ReplyDeleteNitpicky but missing "a" in "account" in the first code example.
EXPECT_THAT(ccount_.Withdraw(Usd(1)), IsOk());
Fixed. Thanks!
ReplyDeleteAs a general rule, Helper methods should be avoided because it scatters context.
ReplyDeleteDuplicating the helper method body inside the test cases is Ok as it gives all the context necessary to understand the test case.