* 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:
返信削除* 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");
Nice post. Just the kind of information I was searching for.
返信削除Nitpicky but missing "a" in "account" in the first code example.
EXPECT_THAT(ccount_.Withdraw(Usd(1)), IsOk());
Fixed. Thanks!
返信削除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.