public void ThrowArgumentException_WhenTryingToRemoveProductWhoIsNotInCollection() { //arrange var database = new Models.Database(); var productStub = new Mock <IProduct>(); //act database.RemoveProduct(productStub.Object); }
public void ThrowArgumentNullException_WhenNullParameterIsPassed() { //arrange var database = new Models.Database(); var productStub = new Mock <IProduct>(); //act database.RemoveProduct(null); //assert }
public void RemoveExistingProductFromCollectionCorrectly_WhenValidObjectIsPassed() { //arrange var database = new Models.Database(); var productStub = new Mock <IProduct>(); //act database.AddProduct(productStub.Object); database.RemoveProduct(productStub.Object); //assert Assert.IsTrue(database.Products.Count == 0); }