예제 #1
0
 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);
 }
예제 #2
0
 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);
     }
 }