public void AssertMirrorCardStatsOnDetailsPage() { CardsPage _cardsPage = new CardsPage(driver); _cardsPage.GoTo(); Thread.Sleep(TimeSpan.FromSeconds(10)); _cardsPage.GetCardByCardName("Mirror").Click(); CardDetailsPage _cardDetailsPage = new CardDetailsPage(driver); var mirror = new MirrorCard(); Assert.AreEqual(mirror.Category, _cardDetailsPage._Map.CardRarity.Text.Split(',')[0]); Assert.AreEqual(mirror.Arena, _cardDetailsPage._Map.CardRarity.Text.Split(',')[1].Trim()); Assert.AreEqual(mirror.Name, _cardDetailsPage._Map.CardName.Text); Assert.AreEqual(mirror.RarityStatus, _cardDetailsPage._Map.CardRarityStatus.Text); }
public Card GetCardByName(string cardName) { var card = new Card(); switch (cardName) { case "Ice Spirit": card = new IceSpiritCard(); break; case "Mirror": card = new MirrorCard(); break; default: throw new System.ArgumentException($"card not found: {cardName}"); } return(card); }