public void TestVerifyNotExists() { var ExpectedResult = new ValidateResult(); CardServices _Repo = new CardServices(); IEnumerator enumerator = KeyTestData.GetEnumerator(); while (enumerator.MoveNext()) { object obj = enumerator.Current; CardData4Test_key keydef = new CardData4Test_key(); CardData4Test_key key = (obj != null) ? ((CardData4Test_key)obj) : keydef; if (key.TestScenario == ScenarioTest.DoesNotExists) { CardData4Test card = TestData[key]; ExpectedResult = new ValidateResult { Result = card.ExpectedResult }; CardInfo cardtest = CardInfo.Create(card.Name, card.CardNo, card.ExpDate); var Test = _Repo.ValidateCardInfo(cardtest); Assert.AreEqual(ExpectedResult.Result, Test.Result); } } }
public CardInfo MappingModel(CardTable card) { CardInfo oCard = (card != null) ? CardInfo.Create(card.NameOnCard, card.CardNumber, card.ExpiryDate) : null; return(oCard); }