public void SetUp() { artist = CreateEntry.Producer(name: "Tripshots"); vocalist = CreateEntry.Vocalist(name: "Hatsune Miku"); repository = new FakeArtistRepository(artist, vocalist); var weblink = new ArtistWebLink(artist, "Website", "http://tripshots.net", WebLinkCategory.Official); artist.WebLinks.Add(weblink); repository.Save(weblink); repository.SaveNames(artist, vocalist); user = CreateEntry.User(name: "Miku", group: UserGroupId.Moderator); repository.Save(user); permissionContext = new FakePermissionContext(user); imagePersister = new InMemoryImagePersister(); queries = new ArtistQueries(repository, permissionContext, new FakeEntryLinkFactory(), imagePersister, imagePersister, MemoryCache.Default, new FakeUserIconFactory(), new EnumTranslations()); newArtistContract = new CreateArtistContract { ArtistType = ArtistType.Producer, Description = string.Empty, Names = new[] { new LocalizedStringContract("Tripshots", ContentLanguageSelection.English) }, WebLink = new WebLinkContract("http://tripshots.net/", "Website", WebLinkCategory.Official) }; }
public virtual bool Equals(ArtistWebLink another) { if (another == null) return false; if (ReferenceEquals(this, another)) return true; return this.Id == another.Id; }
public virtual bool Equals(ArtistWebLink another) { if (another == null) { return(false); } if (ReferenceEquals(this, another)) { return(true); } return(this.Id == another.Id); }
public void SetUp() { _artist = CreateEntry.Producer(name: "Tripshots"); _vocalist = CreateEntry.Vocalist(name: "Hatsune Miku"); _repository = new FakeArtistRepository(_artist, _vocalist); var weblink = new ArtistWebLink(_artist, "Website", "http://tripshots.net", WebLinkCategory.Official, disabled: false); _artist.WebLinks.Add(weblink); _repository.Save(weblink); _repository.SaveNames(_artist, _vocalist); _user = CreateEntry.User(name: "Miku", group: UserGroupId.Moderator); _user2 = CreateEntry.User(name: "Rin", group: UserGroupId.Regular); _repository.Save(_user); _permissionContext = new FakePermissionContext(_user); _imagePersister = new InMemoryImagePersister(); _queries = new ArtistQueries( _repository, _permissionContext, new FakeEntryLinkFactory(), _imagePersister, _imagePersister, MemoryCache.Default, new FakeUserIconFactory(), new EnumTranslations(), _imagePersister, new FakeDiscordWebhookNotifier()); _newArtistContract = new CreateArtistContract { ArtistType = ArtistType.Producer, Description = string.Empty, Names = new[] { new LocalizedStringContract("Tripshots", ContentLanguageSelection.English) }, WebLink = new WebLinkContract("http://tripshots.net/", "Website", WebLinkCategory.Official, disabled: false) }; }