private void AssertCharacterDataMatches(BaseCharacterModel characterFromDb, WebCharacter webCharacterFromKhPage) { Assert.That(characterFromDb.Name, Is.Not.EqualTo(string.Empty)); Assert.That(characterFromDb.Name, Is.Not.Null); Assert.That(characterFromDb.Name, Is.EqualTo(webCharacterFromKhPage.Name), $"{characterFromDb.Name} does not match Kh page value for character {webCharacterFromKhPage.Name}"); Assert.That(characterFromDb.MainImageUrl, Is.EqualTo(webCharacterFromKhPage.MainImageUrl), $"{characterFromDb.Name} MainImageUrl does not match Kh page value for character {webCharacterFromKhPage.Name}"); Assert.That(characterFromDb.ColorTheme, Is.EqualTo(webCharacterFromKhPage.ColorHex), $"{characterFromDb.Name} ColorTheme does not match Kh page value for character {webCharacterFromKhPage.Name}"); //TODO: This is because of the additional layer between the roster and the characters for mii fighters //I'll adjust this if there is another patch. Otherwise, it's just not worth it to verify right now. //Mii frame data is still pulled. if (!characterFromDb.Name.Contains("Mii")) { Assert.That(characterFromDb.ThumbnailUrl, Is.EqualTo(_thumbnailUrls.First(t => t.Key.Equals(webCharacterFromKhPage.Name.ToUpper())).Url), $"{characterFromDb.Name} ThumbnailUrl does not match Kh page value for character {webCharacterFromKhPage.Name}"); } }
public WebCharacter(BaseCharacterModel existingCharacter) { Name = existingCharacter.Name; var enumValue = (Characters)Enum.Parse(typeof(Characters), existingCharacter.Name, true); _urlTail = CharacterUtility.GetEnumDescription(enumValue); Id = existingCharacter.Id; _page = new Page(UrlBase + _urlTail, Id); GetData(); }
protected bool Equals(BaseCharacterModel other) { return string.Equals(Style, other.Style) && string.Equals(MainImageUrl, other.MainImageUrl) && string.Equals(ThumbnailUrl, other.ThumbnailUrl) && string.Equals(Description, other.Description) && string.Equals(ColorTheme, other.ColorTheme) && string.Equals(Name, other.Name) && string.Equals(DisplayName, other.DisplayName) && Id == other.Id; }