A class which represents the Customers table in the Northwind Database.
상속: IActiveRecord
예제 #1
0
 public static void Setup(int testItems) {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         Customer item=new Customer();
         _testRepo._items.Add(item);
     }
 }
예제 #2
0
        public void Insertion_Of_NewRecord_With_StringPK_ShouldNot_Overwrite_KeyValue() {
            var customer = new Customer();
            customer.CustomerID = "ROBCO";
            customer.Address = "";
            customer.City = "";
            customer.CompanyName = "";
            customer.ContactName = "";
            customer.ContactTitle = "";
            customer.Country = "";
            customer.Phone = "";
            customer.PostalCode = "";
            customer.Region = "";
            customer.Save();


            Assert.NotNull(customer.CustomerID);
            Assert.Equal("ROBCO", customer.CustomerID);

            //delete
            Customer.Delete(x => x.CustomerID == "ROBCO");
        }
예제 #3
0
 public static void Setup(Customer item) {
     SetTestRepo();
     _testRepo._items.Add(item);
 }