protected override void PopulateRecords(IEnumerable<Match> lines) { var record = new SoundMix(); foreach (var line in lines) { var rawRecord = UtfStr(line); var recordSplit = rawRecord.Split('\t').Where(val => val != "").ToArray(); if (recordSplit.Length < 1) continue; var movie = new MovieBase(); FixMovieNames(movie, recordSplit[0]); if (!movie.Equals((MovieBase) record)) { if (!string.IsNullOrWhiteSpace(record.MovieName)) _records.Add(record); record = new SoundMix { Episode = movie.Episode, MovieName = movie.MovieName, Year = movie.Year }; } if (recordSplit.Length >= 2) record.SoundModeList.Add(recordSplit[1]); } }
private SoundMix ConvertSoundMix(SoundMix soundMix) { if (BlamCache.Version == CacheVersion.Halo3Retail) { soundMix.Unknown1 = 0; } return(soundMix); }
public void RetrieveAdditionalInformationTest_withInvalidID() { SoundMix entry = new SoundMix("_aaa"); // Act int count = entry.RetrieveAdditionalInformation(); // Assert Assert.AreEqual(0, count); }
public void RetrieveAdditionalInformationTest_withValidID() { // Arrange SoundMix entry = new SoundMix("_xxx"); // Act int count = entry.RetrieveAdditionalInformation(); // Assert Assert.AreEqual(0, count); }
public void SoundMixTest_withID() { // Arrange SoundMix entry = new SoundMix("_xxx"); // Act // Assert Assert.IsNotNull(entry); Assert.IsNotNull(entry.Reader); Assert.AreEqual("_xxx", entry.ID); Assert.IsNull(entry.EnglishTitle); Assert.IsNull(entry.GermanTitle); Assert.IsNull(entry.Details); Assert.IsNull(entry.Status); Assert.IsNull(entry.LastUpdated); }
public void RetrieveBasicInformationTest_withValidID_AdditionalInfo() { // Arrange SoundMix entry = new SoundMix("_xxx"); // Act int count = entry.RetrieveBasicInformation(false); // Assert Assert.AreEqual(1, count); Assert.AreEqual("_xxx", entry.ID); Assert.AreEqual("SoundMix EnglishTitle X", entry.EnglishTitle); Assert.AreEqual("SoundMix GermanTitle X", entry.GermanTitle); Assert.AreEqual("SoundMix Details X", entry.Details); Assert.AreEqual("_xxx", entry.Status.ID); Assert.AreEqual("SoundMix LastUpdated X", entry.LastUpdated); }
public void RetrieveTest_withInvalidID_AdditionalInfo() { // Arrange SoundMix entry = new SoundMix("_aaa"); // Act int count = entry.Retrieve(false); // Assert Assert.AreEqual(0, count); Assert.AreEqual("_aaa", entry.ID); Assert.IsNull(entry.EnglishTitle); Assert.IsNull(entry.GermanTitle); Assert.IsNull(entry.Details); Assert.IsNull(entry.Status); Assert.IsNull(entry.LastUpdated); }
public void RetrieveBasicInformationTest_withInvalidID_BasicInfoOnly() { // Arrange SoundMix entry = new SoundMix("_aaa"); // Act int count = entry.RetrieveBasicInformation(true); // Assert Assert.AreEqual(0, count); Assert.AreEqual("_aaa", entry.ID); Assert.IsNull(entry.EnglishTitle); Assert.IsNull(entry.GermanTitle); Assert.IsNull(entry.Details); Assert.IsNull(entry.Status); Assert.IsNull(entry.LastUpdated); }