Пример #1
0
		private void AssertArtists(NicoTitleParseResult result, params string[] artists) {
			
			Assert.AreEqual(artists.Length, result.Artists.Count, "Number of artists");
			foreach (var artist in artists) {
				Assert.IsTrue(result.Artists.Any(a => a.DefaultName == artist), string.Format("Has artist {0}", artist));
			}

		}
        public NewSongCheckResultContract(DuplicateEntryResultContract<SongMatchProperty>[] matches, NicoTitleParseResult titleParseResult, ContentLanguagePreference languagePreference)
        {
            this.Matches = matches;

            if (titleParseResult != null) {
                this.Artists = titleParseResult.ArtistNames.Where(a => a != null).Select(a => new ArtistContract(a, languagePreference)).ToArray();
                this.SongType = titleParseResult.SongType;
                this.Title = titleParseResult.Title;
            }
        }