Skip to content

Instantly share code, notes, and snippets.

@obegendi
Created July 21, 2019 16:05
Show Gist options
  • Save obegendi/2a1ad23d393c5aa983c47f220e8c2c94 to your computer and use it in GitHub Desktop.
Save obegendi/2a1ad23d393c5aa983c47f220e8c2c94 to your computer and use it in GitHub Desktop.
[Fact]
public void CustomerCheckShouldUpdateIsAppliedProperty()
{
//Arrange
var mockValidator = new Mock<IValidator>();
mockValidator.Setup(x => x.Customer.IsValid).Returns(true);
var sut = new CreditApplicationEvaluator(mockValidator.Object);
var application = new CreditApplication { GrossAnnualIncome = 99_000 };
//Act
sut.Evaluate(application);
//Assert
mockValidator.VerifySet(x => x.IsApplied, Times.Once);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment