public void AmountRangeRepository_RemoveValue() { var repo = new CountryRepository(); var key = "SingleId"; repo.RemoveValue(key); var containsKey = repo.ContainsKey(key); Assert.IsFalse(containsKey); }
public void CountryRepository_RemoveValue() { var repo = new CountryRepository(); var key = "FAK"; repo.RemoveValue(key); var containsKey = repo.ContainsKey(key); Assert.IsFalse(containsKey); }
public void CountryRepository_UpdateValue() { var repo = new CountryRepository(); var key = "ASM"; var countryInfo = new CountryInfo { CountryCode = "ASM", CountryName = "Updated American Samoa", BaseCurrency = "USD" }; repo.UpdateValue(key, countryInfo); var containsKey = repo.ContainsKey(key); var value = repo.GetValue <CountryInfo>(key); Assert.IsNotNull(value); Assert.IsTrue(containsKey); Assert.AreEqual("Updated American Samoa", value.CountryName); }
public void CountryRepository_AddValue() { var repo = new CountryRepository(); var key = "AAA"; var countryInfo = new CountryInfo { CountryCode = "AAA", CountryName = "Added Fake Country", BaseCurrency = "AAA" }; repo.AddValue(key, countryInfo); var value = repo.GetValue <CountryInfo>(key); var containsKey = repo.ContainsKey(key); Assert.IsNotNull(value); Assert.IsTrue(containsKey); Assert.AreEqual("AAA", value.CountryCode); }