public void ConditionMetWithValidFinancialSupportCombinationsReturnsTrue(params int[] candidates) { var handler = new Mock <IValidationErrorHandler>(MockBehavior.Strict); var provider = new Mock <IProvideLookupDetails>(MockBehavior.Strict); provider .Setup(x => x.Get(TypeOfIntegerCodedLookup.FinType)) .Returns(candidates); var sut = new FINTYPE_02Rule(handler.Object, provider.Object); var result = sut.ConditionMet(GetFinancialSupport(candidates)); Assert.True(result); }
public void ConditionMetWithValidFinancialSupportCombinationsReturnsTrue(params int[] candidates) { // arrange var handler = new Mock <IValidationErrorHandler>(MockBehavior.Strict); var provider = new Mock <IProvideLookupDetails>(MockBehavior.Strict); provider .Setup(x => x.AsASet(LookupSimpleKey.FINTYPE)) .Returns(candidates); var sut = new FINTYPE_02Rule(handler.Object, provider.Object); // act var result = sut.ConditionMet(GetFinancialSupport(candidates)); // assert Assert.True(result); }
public void ConditionMetWithInvalidFinancialSupportCombinationsReturnsFalse(params int[] candidates) { // arrange var handler = new Mock <IValidationErrorHandler>(MockBehavior.Strict); var provider = new Mock <IProvideLookupDetails>(MockBehavior.Strict); provider .Setup(x => x.Get(TypeOfIntegerCodedLookup.FINTYPE)) .Returns(candidates); var sut = new FINTYPE_02Rule(handler.Object, provider.Object); // act var result = sut.ConditionMet(GetFinancialSupport(candidates)); // assert Assert.False(result); handler.VerifyAll(); provider.VerifyAll(); }