public void ThenDeleteShoppingItemWithCorrectParametersIsCalledOnce() { var expectedName = ExistingItemName; var expectedId = 1; GenericRepositoryMock.Verify(m => m.Delete(It.Is <ShoppingItem>(s => s.Name == expectedName && s.Id == expectedId && s.ProductType == ProductType.Drink)), Times.Once); }
public void ThenUpdateShoppingItemWithCorrectParametersIsCalledOnce() { var expectedName = ExistingItemName; var expectedQuantity = NewQuantity; GenericRepositoryMock.Verify(m => m.Update(It.Is <ShoppingItem>(s => s.Name == expectedName && s.Quantity == expectedQuantity && s.ProductType == ProductType.Drink)), Times.Once); }
public void ThenGetShoppingItemslIsCalledOnce() { GenericRepositoryMock.Verify(m => m.Get(), Times.Once); }
public void ThenDeleteShoppingItemIsNeverCalled() { GenericRepositoryMock.Verify(m => m.Delete(It.IsAny <ShoppingItem>()), Times.Never); }
public void ThenGetShoppingItemConditionalIsCalledOnce() { GenericRepositoryMock.Verify(m => m.GetConditional(It.IsAny <Expression <Func <ShoppingItem, bool> > >()), Times.Once); }
public void ThenSaveChangesIsCalledOnce() { GenericRepositoryMock.Verify(m => m.Save(), Times.Once); }
public void ThenDeleteShoppingItemIsCalledOnce() { GenericRepositoryMock.Verify(m => m.Delete(It.IsAny <ShoppingItem>()), Times.Once); }
public void ThenSaveChangesIsNeverCalled() { GenericRepositoryMock.Verify(m => m.Save(), Times.Never); }