コード例 #1
0
 public void CheckReturnsRequestIfAnyChildSetWithOr()
 {
     var child1 = new TriggerStub { OnCheckAction = () => null };
     var child2 = new TriggerStub { OnCheckAction = () => new IntegrationRequest("Dummy") };
     var trigger = new Multiple(child1, child2);
     var actual = trigger.Check();
     Assert.IsNotNull(actual);
     Assert.AreEqual("Multiple", actual.SourceTrigger);
 }
コード例 #2
0
 public void CheckReturnsRequestIfAllChildrenSetWithAnd()
 {
     var child1 = new TriggerStub { OnCheckAction = () => new IntegrationRequest("Dummy") };
     var child2 = new TriggerStub { OnCheckAction = () => new IntegrationRequest("Dummy") };
     var trigger = new Multiple(child1, child2)
                       {
                           Condition = CombinationOperator.And
                       };
     var actual = trigger.Check();
     Assert.IsNotNull(actual);
     Assert.AreEqual("Multiple", actual.SourceTrigger);
 }
コード例 #3
0
 public void CheckReturnsNullIfAllChildrenNullWithOr()
 {
     var child1 = new TriggerStub { OnCheckAction = () => null };
     var child2 = new TriggerStub { OnCheckAction = () => null };
     var trigger = new Multiple(child1, child2);
     var actual = trigger.Check();
     Assert.IsNull(actual);
 }
コード例 #4
0
 public void CheckReturnsNullIfAnyChildNullWithAnd()
 {
     var child1 = new TriggerStub { OnCheckAction = () => null };
     var child2 = new TriggerStub { OnCheckAction = () => new IntegrationRequest("Dummy") };
     var trigger = new Multiple(child1, child2)
                       {
                           Condition = CombinationOperator.And
                       };
     var actual = trigger.Check();
     Assert.IsNull(actual);
 }