public async void LoadFromCache_ToListAsync_LoadsFromCache() { // Arrange var mockProvider = new MockProvider(); var dicomDataLoader = mockProvider.GetDicomDataLoaderFake(); var dicomQuery = new DicomQuery<TestInfo>(mockProvider.GetGeneralizedInfoProviderFake(), dicomDataLoader, mockProvider.GetWhereCollectionFake()); // Act await dicomQuery.LoadFromServer().LoadFromCache().ToListAsync(); // Assert Assert.That(() => dicomDataLoader.Received(1).LoadDataFromCacheAsync(Arg.Any<IWhereCollection<TestInfo>>()), Throws.Nothing); }