public async Task PlayListGetAllAsync() { // Act var playLists = await _repo.GetAllAsync(); // Assert Assert.Single(playLists); }
public async Task DotMemoryUnitTest() { var repo = new PlaylistRepository(); await repo.GetAllAsync(); dotMemory.Check(memory => Assert.Equal(1, memory.GetObjects(where => where.Type.Is <Playlist>()).ObjectsCount)); GC.KeepAlive(repo); // prevent objects from GC if this is implied by test logic }