public async Task DotMemoryUnitTest()
        {
            var repo = new PlaylistTrackRepository();

            await repo.GetAllAsync();

            dotMemory.Check(memory =>
                            Assert.Equal(1, memory.GetObjects(where => where.Type.Is <PlaylistTrack>()).ObjectsCount));

            GC.KeepAlive(repo); // prevent objects from GC if this is implied by test logic
        }
コード例 #2
0
 public SchemaRepositoryContainer()
 {
     #region Entity Repositories
     Album         = new AlbumRepository();
     Artist        = new ArtistRepository();
     Genre         = new GenreRepository();
     MediaType     = new MediaTypeRepository();
     Playlist      = new PlaylistRepository();
     PlaylistTrack = new PlaylistTrackRepository();
     Track         = new TrackRepository();
     #endregion
     #region Store Procedure Repository
     StoredProcs = new StoredProcRepository();
     #endregion
     // If not implemented this method is removed during compilation
     LoadCustomRepositories();
 }
 public PlayListTrackRepositoryTest()
 {
     _repo = new PlaylistTrackRepository();
 }