public async Task <IEnumerable <ISnapshot> > LoadSnapshotsAsync() { _snapshotCategories ??= SnapshotTestData.GetSnapshotCategories(Scope) .SelectMany(x => x.Snapshots) .ToList(); await File.AppendAllLinesAsync(@"C:\Temps\Log\log1.txt", _snapshotCategories?.Select(x => $"{Scope} - {x.Title}")); return(_snapshotCategories); }
public void CorrectlySetScope(string scope) { var target = Target; var current = target.Current; current.Scope = scope; var categories = target.SnapshotCategories; var expectedCategories = SnapshotTestData.GetSnapshotCategories(scope); Assert.That(categories, Is.EquivalentTo(expectedCategories) .Using <SnapshotCategoryItem, SnapshotCategory>((x, y) => Equals(x.CategoryName, y.Category) && x.Items.Select(item => item.Title) .OrderBy(title => title).SequenceEqual(y.Snapshots.Select(item => item.Title).OrderBy(title => title)))); }