chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hey guys,

i have a function which calls a helper function twice. Now i need to return different results for the second call. How can i implement this?

Thanks in advance!

Bye, Michael
asked by michaels (640 points)

11 Answers

0 votes
Hi,

We're getting into tool philosophy here :)
Our vision is that we want everyone to unit test their code. That means power-users (like you), as well as beginners. We know that beginners make mistake, and sometimes these mistakes turn them completely off unit testing.
So this is a choice we're making: We'd rather give up flexibility in our tools, than have people write bad tests and regret it. We believe in starting with guidance to write better test through the tool, than have you write complex tests that are hard to maintain.

Don't get this wrong - we're always on the lookout for more and better features. If you have more, please tell us.
You do have a point about possible usage of overriding APIs, which, if requested a lot, we'll consider in the future.
answered by alex (17k points)
...