Esempio n. 1
0
        public void ProductFormat_Create()
        {
            var repository = new ProductFormatRepository();
            //ProductFormat productFormat = new ProductFormat()
            //{
            //    ProductID = 1,
            //    Color = "紅色",
            //    Size = "L",
            //    StockQuantity = 50
            //};
            //repository.Create(productFormat);
            //ProductFormat productFormat1 = new ProductFormat()
            //{
            //    ProductID = 1,
            //    Color = "藍色",
            //    Size = "M",
            //    StockQuantity = 30
            //};
            //repository.Create(productFormat1);
            //ProductFormat productFormat2 = new ProductFormat()
            //{
            //    ProductID = 2,
            //    Color = "黑色",
            //    Size = "S",
            //    StockQuantity = 45
            //};
            //repository.Create(productFormat2);
            var productFormats = repository.GetAll();

            Assert.IsTrue(productFormats.Count() > 0);
        }
Esempio n. 2
0
        public void Test_GetAll_ProductFormat()
        {
            var repository = new ProductFormatRepository();
            var product    = repository.GetAll();

            Assert.IsTrue(product.Count() == 0);
        }