Esempio n. 1
0
        public async void GetListOfLaptopAsyncTest()
        {
            ILaptopService laptopService = GetServiceObject();

            DC.LaptopResponse list = await laptopService.GetListOfLaptopAsync();

            Assert.NotEmpty(list.Laptops);
        }
Esempio n. 2
0
        public async void AddHddAsyncTest()
        {
            ILaptopService laptopService = GetServiceObject();
            Hdd            hdd           = new Hdd();

            hdd.Type  = "5 TB";
            hdd.Price = "500";
            bool flag = await laptopService.AddHddAsync(hdd);

            Assert.True(flag);
        }
Esempio n. 3
0
        public async void AddRamAsyncTest_Fail()
        {
            ILaptopService laptopService = GetServiceObject();
            Ram            ram           = new Ram();

            ram.Type  = "8GB";
            ram.Price = "500";
            bool flag = await laptopService.AddRamAsync(ram);

            Assert.False(flag);
        }
Esempio n. 4
0
        public async void AddColorAsyncTest()
        {
            ILaptopService laptopService = GetServiceObject();
            Color          color         = new Color();

            color.Type  = "4 TB";
            color.Price = "500";
            bool flag = await laptopService.AddColorAsync(color);

            Assert.True(flag);
        }
Esempio n. 5
0
        public async void AddLaptopAsyncTest()
        {
            ILaptopService laptopService = GetServiceObject();
            Laptop         laptop        = new Laptop();

            laptop.Name  = "Lenova";
            laptop.Price = "500";
            DC.LaptopResponse laptopResponse = await laptopService.AddLaptopAsync(laptop);

            Laptop laptopActual = laptopResponse.Laptops[laptopResponse.Laptops.Count - 1];

            Assert.Equal(laptop.Name, laptopActual.Name);
            Assert.Equal(laptop.Price, laptopActual.Price);
        }
Esempio n. 6
0
 public LaptopProvider(ILaptopService laptopService)
 {
     _laptopService = laptopService;
 }
Esempio n. 7
0
 public LaptopController(ILaptopService laptopService)
 {
     _laptopService = laptopService;
 }
Esempio n. 8
0
 public LaptopsController(ILaptopService Service)
 {
     _laptopService = Service;
 }
Esempio n. 9
0
 public LaptopModelsController(ILaptopService laptopService)
 {
     this.laptopService = laptopService;
 }
Esempio n. 10
0
 public LaptopUnitTest()
 {
     _laptopService = new ECommerceDataFake();
     _controller    = new LaptopController(_laptopService);
 }
 public RentController(IRentService rentService, ILaptopService laptopService)
 {
     _rentService   = rentService;
     _laptopService = laptopService;
 }
Esempio n. 12
0
 public LaptopController(ILaptopService LaptopService)
 {
     this._laptopService = LaptopService;
 }
 public IndexModel(ILaptopService laptopService)
 {
     _laptopservice = laptopService;
 }