public async Task SaveCustomerTest() { MerchandiseService merchandiseService = new MerchandiseService(); MerchandiseDto merchandiseDto = new MerchandiseDto("0", "Jajao", "Produkt wiejski", ArticleType.GROCERIES.ToString(), ArticleUnit.PACK.ToString(), 13.20, 0.01); await merchandiseService.SaveMerchandise(merchandiseDto); List <MerchandiseDto> gotMerchandiseDtos = (await merchandiseService.GetMerchandises()).ToList(); Assert.AreEqual(1, gotMerchandiseDtos.Count()); }
public async Task GetCustomerTest() { MerchandiseService merchandiseService = new MerchandiseService(); MerchandiseDto merchandiseDto = new MerchandiseDto("0", "Jajao", "Produkt wiejski", ArticleType.GROCERIES.ToString(), ArticleUnit.PACK.ToString(), 13.20, 0.01); await merchandiseService.SaveMerchandise(merchandiseDto); MerchandiseDto gotMerchandiseDto = await merchandiseService.GetMerchandise("0"); Assert.IsNotNull(gotMerchandiseDto); }
public void CreateMerchandiseServiceTest() { MerchandiseService customerService = new MerchandiseService(); Assert.IsNotNull(customerService); }