示例#1
0
            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>();
            }
示例#2
0
            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>();
            }