Created
July 21, 2019 16:33
-
-
Save obegendi/5ddc0a6a6f557b197d013b7f8e5e6bc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Fact] | |
| public void SendToBranchWhenIsValidException() | |
| { | |
| //Arrange | |
| Mock<IValidator> mockValidator | |
| = new Mock<IValidator>(); | |
| mockValidator.Setup(x => x.ServiceStatus).Returns(Status.NotOK); | |
| mockValidator.Setup(x => x.IsValid(It.IsAny<string>())) | |
| .Throws(new Exception("Some exception Message")); | |
| var sut = new CreditApplicationEvaluator(mockValidator.Object); | |
| var application = new CreditApplication { Age = 42 }; | |
| //Act | |
| CreditApplicationDecision decision = sut.Evaluate(application); | |
| //Assert | |
| Assert.Equal(CreditApplicationDecision.BranchFlow, decision); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment