Exemple #1
0
        public void UpdateCreateSalesReportBLLIsItemExistsTest2()
        {
            //Arrange
            UpdateCreateSalesReportBLL updateCreateSalesReportBLL = new UpdateCreateSalesReportBLL();
            OfficeStoreContext         officeStoreContext         = new OfficeStoreContext();

            //Act
            bool IsItemExists = updateCreateSalesReportBLL.IsItemExists("1212121212");

            //Assert
            Assert.IsFalse(IsItemExists);
        }
Exemple #2
0
        public void UpdateCreateSalesReportBLLIsItemExistsTest()
        {
            //Arrange
            UpdateCreateSalesReportBLL updateCreateSalesReportBLL = new UpdateCreateSalesReportBLL();
            OfficeStoreContext         officeStoreContext         = new OfficeStoreContext();

            //Act
            updateCreateSalesReportBLL.CreateItem(new Items()
            {
                Id = "12", ProductName = "bira", Status = "Factory New", OriginalPrice = 1, SalesPrice = 2, Quantity = 12
            });
            bool IsItemExists = updateCreateSalesReportBLL.IsItemExists("12");

            //Assert
            Assert.IsTrue(IsItemExists);
            officeStoreContext.Items.Remove(officeStoreContext.Items.First(a => a.ProductName == "bira"));
            officeStoreContext.SaveChanges();
        }