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