public void ChangeOwner_WhenCostOwnerIsNull_ShouldThrowException() { // Arrange var cost = new Cost(); CostUser owner = null; // Act // Assert CostService.Awaiting(s => s.ChangeOwner(User, cost, owner)).ShouldThrow <ArgumentNullException>(); }
public void ChangeOwner_WhenUserIdentityIsNull_ShouldThrowException() { // Arrange Cost cost = new Cost { Owner = new CostUser() }; CostUser owner = new CostUser(); // Act // Assert CostService.Awaiting(s => s.ChangeOwner(null, cost, owner)).ShouldThrow <ArgumentNullException>(); }