Created
April 15, 2020 05:27
-
-
Save masaab/0c745055db2e0b0ae00188ae55e17e25 to your computer and use it in GitHub Desktop.
return mocked item for IAyncEnumerable using AutoFixture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async IAsyncEnumerable<ScheduledJob> GetXNumberofScheduledJobs(int totalNumberofScheduledJob) | |
| { | |
| AutoFixture = new Fixture(); | |
| IEnumerator<ScheduledJob> enumerator = AutoFixture.CreateMany<ScheduledJob>(5).GetEnumerator(); | |
| while (enumerator.MoveNext()) | |
| { | |
| yield return enumerator.Current; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment