public async void RandomCollectionReview(int noteCount) { // Setup DB & LazyLoader CardDbAsync db = new CardDbAsync(); // Setup collection CollectionConfig config = CollectionConfig.Default; CollectionGenerator generator = new CollectionGenerator( new CardGenerator(new TimeGenerator(3 * 30, true), config, noteCount * 2), noteCount, 3); IEnumerable <Note> notes = await generator.GenerateAsync(db).ConfigureAwait(true); // Collection review testing ReviewCollectionImpl reviewCollection = new ReviewCollectionImpl(db, config, true); bool @continue = await reviewCollection.Initialized.ConfigureAwait(true); while (@continue) { Card currentCard = reviewCollection.Current; currentCard.Should().NotBeNull(); currentCard.Data.Should().NotBeNull(); @continue = await reviewCollection.AnswerAsync(Grade.Good).ConfigureAwait(true); } }
private async Task OnGenerateTestCollectionCommandExecuteAsync() { var collectionGenerator = new CollectionGenerator( new CardGenerator(new TimeGenerator(90), CollectionConfig.Default, 200), 100, 3); await collectionGenerator.GenerateAsync(_database).ConfigureAwait(true); await _messageService.ShowInformationAsync( "Collection successfully Generated", "PageableCollection Debugging") .ConfigureAwait(true); }