public void CurrencyRepository_RemoveValue() { var repo = new CurrencyRepository(); var key = "LVL"; repo.RemoveValue(key); var containsKey = repo.ContainsKey(key); Assert.IsFalse(containsKey); }
public void CurrencyRepository_UpdateValue() { var repo = new CurrencyRepository(); var key = "FJD"; var currency = new CurrencyInfo { CurrencyCode = "FJD", CurrencyName = "UPDATED FIJI DOLLAR" }; repo.UpdateValue(key, currency); var containsKey = repo.ContainsKey(key); var value = repo.GetValue <CurrencyInfo>(key); Assert.IsNotNull(value); Assert.IsTrue(containsKey); Assert.AreEqual("UPDATED FIJI DOLLAR", value.CurrencyName); }
public void CurrencyRepository_AddValue() { var repo = new CurrencyRepository(); var key = "FAK"; var currency = new CurrencyInfo { CurrencyCode = "FAK", CurrencyName = "Fake Dollar" }; repo.AddValue(key, currency); var value = repo.GetValue <CurrencyInfo>(key); var containsKey = repo.ContainsKey(key); Assert.IsNotNull(value); Assert.IsTrue(containsKey); Assert.AreEqual("FAK", value.CurrencyCode); }