public void Check_If_Product_Saves_In_List() { // arrange var productDALStub = new ProductDALStub(); productDALStub.ExistReturnValue = false; // act productDALStub.SaveProductsInList(); // assert Assert.True(productDALStub.ExistReturnValue); }
public void Check_If_Get_All_Products_From_Database() { // arrange var productDALStub = new ProductDALStub(); productDALStub.ExistReturnValue = false; // act productDALStub.SelectAllProducts(); // assert Assert.True(productDALStub.ExistReturnValue); }
public void Check_Get_AllProducts_In_Container() { //Arrange var productDALStub = new ProductDALStub(); var productContainer = new ProductContainer(productDALStub); productDALStub.ExistReturnValue = false; //Act productContainer.AllProducts(); //Assert Assert.True(productDALStub.ExistReturnValue); }
public void Check_If_Get_List() { //Arrange var productDALStub = new ProductDALStub(); var productContainer = new ProductContainer(productDALStub); List <Product> products = new List <Product>(); productDALStub.ExistReturnValue = false; //Act var productList = productContainer.GetList(); //Assert Assert.Equal(products, productList); }
public void Check_if_list_is_cleared() { //Arrange var productDALStub = new ProductDALStub(); var productContainer = new ProductContainer(productDALStub); List <Product> products = new List <Product>(); Product product = new Product(); //Act products.Add(product); products.Add(product); products.Add(product); var list = productContainer.GetList(); productContainer.ClearList(); //Assert var result = list.Count(); var expected = 0; Assert.Equal(expected, result); }