Example #1
0
        public void SetUp()
        {
            repository = new FakeAlbumRepository();
            var permissionContext = new FakePermissionContext();
            var thumbPersister    = new InMemoryImagePersister();

            queries = new EntryQueries(repository, permissionContext, thumbPersister);

            var group  = CreateEntry.Artist(ArtistType.OtherGroup, name: "1640mP");
            var artist = CreateEntry.Producer(name: "40mP");
            var tag    = new Tag("pop_rock");

            artist.Tags.Usages.Add(new ArtistTagUsage(artist, tag));
            var artist2 = CreateEntry.Producer(name: "Tripshots");
            var album   = CreateEntry.Album(name: "40mP Piano Arrange Album");
            var song    = CreateEntry.Song(name: "Mosaik Role [40mP ver.]");

            repository.Save(group, artist, artist2);
            repository.Save(album);
            repository.Save(song);
            repository.Save(tag);
        }
Example #2
0
		public void SetUp() {
			
			repository = new FakeAlbumRepository();
			var permissionContext = new FakePermissionContext();
			var thumbPersister = new InMemoryImagePersister();

			queries = new EntryQueries(repository, permissionContext, thumbPersister);

			var group = CreateEntry.Artist(ArtistType.OtherGroup, name: "1640mP");
			var artist = CreateEntry.Producer(name: "40mP");
			var tag = new Tag("pop_rock");
			artist.Tags.Usages.Add(new ArtistTagUsage(artist, tag));
			var artist2 = CreateEntry.Producer(name: "Tripshots");
			var album = CreateEntry.Album(name: "40mP Piano Arrange Album");
			var song = CreateEntry.Song(name: "Mosaik Role [40mP ver.]");

			repository.Save(group, artist, artist2);
			repository.Save(album);
			repository.Save(song);
			repository.Save(tag);

		}
Example #3
0
        public void List_FilterByCanonizedArtistName()
        {
            var artist = CreateEntry.Producer(name: "nightmare-P");

            repository.Save(artist);

            var resultExact   = CallGetList(query: "nightmare-P");
            var resultVariant = CallGetList(query: "nightmareP");
            var resultPartial = CallGetList(query: "nightmare");

            AssertHasEntry(resultExact, "nightmare-P", EntryType.Artist);
            AssertHasEntry(resultVariant, "nightmare-P", EntryType.Artist);
            AssertHasEntry(resultPartial, "nightmare-P", EntryType.Artist);
        }
Example #4
0
 private void Save <T>(params T[] entity) where T : class, IDatabaseObject
 {
     _repository.Save(entity);
 }
Example #5
0
 private void Save <T>(params T[] entity)
 {
     repository.Save(entity);
 }