A class which represents the Products table in the Northwind Database.
Inheritance: IActiveRecord
Esempio n. 1
0
 public static void Setup(int testItems) {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         Product item=new Product();
         _testRepo._items.Add(item);
     }
 }
Esempio n. 2
0
 public static void Setup(Product item) {
     SetTestRepo();
     _testRepo._items.Add(item);
 }
Esempio n. 3
0
 public void PullingSingle_Should_Set_New_Product_IsNew_False() {
     var product = new Product();
     product = Product.SingleOrDefault(x => x.ProductID == 1);
     Assert.Equal(false, product.IsNew());
 }
Esempio n. 4
0
 public void PullingSingle_Should_Set_New_Product_IsLoaded_True() {
     var product = new Product();
     product = Product.SingleOrDefault(x => x.ProductID == 1);
     Assert.Equal(true, product.IsLoaded());
 }
Esempio n. 5
0
 public void CreatingNew_Product_Should_Set_IsLoaded_False() {
     var product = new Product();
     Assert.Equal(false, product.IsLoaded());
 }
Esempio n. 6
0
 public void CreatingNew_Product_Should_Set_IsNew_True() {
     var product = new Product();
     Assert.Equal(true, product.IsNew());
 }