You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use the same API for marking methods and for creating stubs:
// Mark method so it can be used to record/load the method calls
Sample.of(testee.myTestMethod()); // no is/answer -> marked for persistence
Sample.of(testee.myTestMethod()).is("Hello World"); // creating stub to be returned when a real call appears. -> no persistence
This might be confusing when using both ways in a single test. So we should divide these apis to make transparent to the user what is happening.
The text was updated successfully, but these errors were encountered:
There is also a problem regarding the sequence of the Sample definitions. If manual Samples (non persistent) are defined before persistent samples are loaded from a file, the manual samples are lost. This is a recurring cause for confusion
Currently we use the same API for marking methods and for creating stubs:
// Mark method so it can be used to record/load the method calls
Sample.of(testee.myTestMethod()); // no is/answer -> marked for persistence
Sample.of(testee.myTestMethod()).is("Hello World"); // creating stub to be returned when a real call appears. -> no persistence
This might be confusing when using both ways in a single test. So we should divide these apis to make transparent to the user what is happening.
The text was updated successfully, but these errors were encountered: