public async void Test12() { RemoveAProduct removeAProduct = new RemoveAProduct(); await removeAProduct.RemoveAProductByID("P125"); Assert.False(RemoveAProduct.isRemoved); }
private async void RemoveButton_Click(object sender, RoutedEventArgs e) { RemoveAProduct product = new RemoveAProduct(); await product.RemoveAProductByID(productIdSelected); this.RefreshButton_Click(sender, e); }
public async void Test11() { GetAllProducts getAllProducts = new GetAllProducts(); await getAllProducts.GetAllProductsList(); var productsCount = GetAllProducts.productList.Count; RemoveAProduct removeAProduct = new RemoveAProduct(); await removeAProduct.RemoveAProductByID("P114"); await getAllProducts.GetAllProductsList(); var productsCountAfterRemoving = GetAllProducts.productList.Count; Assert.Equal(productsCount - 1, productsCountAfterRemoving); }