private static void _AssertCurrency(Currency pSelectedCurrency, int pId, string pName, string pCode, bool pIsPivot) { Assert.AreEqual(pSelectedCurrency.Id, pId); Assert.AreEqual(pSelectedCurrency.Name, pName); Assert.AreEqual(pSelectedCurrency.Code, pCode); Assert.AreEqual(pSelectedCurrency.IsPivot, pIsPivot); }
public void Add_Currency() { CurrencyManager currencyManager = (CurrencyManager)container["CurrencyManager"]; using (SqlConnection conn = currencyManager.GetConnection()) { Currency currency = new Currency { Code = "US Dollar", IsPivot = false, Name = "USD" }; SqlTransaction t = conn.BeginTransaction(); currency.Id = currencyManager.Add(currency, t); Assert.AreNotEqual(0, currency.Id); } }