Example #1
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);
        }
Example #2
0
 public Task <LaptopResponse> AddLaptopAsync(Laptop laptop)
 {
     return(_laptopService.AddLaptopAsync(laptop));
 }