Skip to content

Instantly share code, notes, and snippets.

@obegendi
Created July 21, 2019 16:27
Show Gist options
  • Save obegendi/9a9509cdaf7517747e712c2bdeecfae1 to your computer and use it in GitHub Desktop.
Save obegendi/9a9509cdaf7517747e712c2bdeecfae1 to your computer and use it in GitHub Desktop.
[Fact]
public void StatusShouldBeSame()
{
//Arrange
var mockValidator = new Mock<IValidator>();
mockValidator.SetupAllProperties();
mockValidator.Setup(x => x.Customer.IsValid).Returns(true);
var sut = new CreditApplicationEvaluator(mockValidator.Object);
var application = new CreditApplication { Age = 30 };
//Act
CreditDecision decision = sut.Evaluate(application);
//Assert
Assert.Equal(decision.Status, mockValidator.Object.Status);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment