A class which represents the Products table in the Northwind Database.
Inheritance: IActiveRecord
Exemple #1
0
 public static void Setup(int testItems) {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         Product item=new Product();
         _testRepo._items.Add(item);
     }
 }
Exemple #2
0
 public static void Setup(Product item) {
     SetTestRepo();
     _testRepo._items.Add(item);
 }
Exemple #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());
 }
Exemple #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());
 }
Exemple #5
0
 public void CreatingNew_Product_Should_Set_IsLoaded_False() {
     var product = new Product();
     Assert.Equal(false, product.IsLoaded());
 }
Exemple #6
0
 public void CreatingNew_Product_Should_Set_IsNew_True() {
     var product = new Product();
     Assert.Equal(true, product.IsNew());
 }