Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seperation of marking the sample for persistence and stubbing the sampled method #45

Closed
rcschrg opened this issue Feb 12, 2021 · 1 comment · Fixed by #78
Closed

Seperation of marking the sample for persistence and stubbing the sampled method #45

rcschrg opened this issue Feb 12, 2021 · 1 comment · Fixed by #78
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@rcschrg
Copy link
Contributor

rcschrg commented Feb 12, 2021

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.

@rcschrg rcschrg added this to the v1.1.0 milestone Feb 12, 2021
@rcschrg rcschrg self-assigned this Feb 12, 2021
@rcschrg rcschrg removed this from the v1.1.0 milestone Feb 12, 2021
@JanSchankin JanSchankin added this to the v1.2.0 milestone Feb 12, 2021
@JanSchankin JanSchankin added this to To do in Dev Feb 16, 2021
@rcschrg rcschrg assigned JanSchankin and unassigned rcschrg Jun 28, 2021
@JanSchankin JanSchankin added the enhancement New feature or request label Jun 29, 2021
@JanSchankin JanSchankin modified the milestones: v1.2.0, v2.0.0 Jun 29, 2021
@JanSchankin JanSchankin moved this from To do to In progress in Dev Jul 2, 2021
JanSchankin added a commit that referenced this issue Jul 26, 2021
@JanSchankin
Copy link
Contributor

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

@JanSchankin JanSchankin linked a pull request Aug 5, 2021 that will close this issue
Dev automation moved this from In progress to Done Aug 10, 2021
JanSchankin added a commit that referenced this issue Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Dev
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants