Наследование: HA4IoT.Conditions.Condition
Пример #1
0
        public void FulfilledCondition_OR_NotFulfilledCondition_ShouldBeFulfilled()
        {
            var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.Or, new NotFulfilledTestCondition());

            Assert.AreEqual(condition.Validate(), ConditionState.Fulfilled);
        }
Пример #2
0
        public void FulfilledCondition_ANDNOT_NotFulfilledCondition_ShouldBeNotFulfilled()
        {
            var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.AndNot, new FulfilledTestCondition());

            Assert.AreEqual(condition.Validate(), ConditionState.NotFulfilled);
        }
Пример #3
0
        public void FulfilledCondition_ANDNOT_NotFulfilledCondition_ShouldBeNotFulfilled()
        {
            var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.AndNot, new FulfilledTestCondition());

            condition.Validate().ShouldBeEquivalentTo(ConditionState.NotFulfilled);
        }
Пример #4
0
        public void ConditionWithMultipleRelatedConditionsMustBeNotFulfilled()
        {
            var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.And, new FulfilledTestCondition()).WithRelatedCondition(ConditionRelation.And, new NotFulfilledTestCondition());

            Assert.AreEqual(condition.Validate(), ConditionState.NotFulfilled);
        }
Пример #5
0
        public void FulfilledCondition_OR_NotFulfilledCondition_ShouldBeFulfilled()
        {
            var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.Or, new NotFulfilledTestCondition());

            condition.Validate().ShouldBeEquivalentTo(ConditionState.Fulfilled);
        }
Пример #6
0
        public void ConditionWithMultipleRelatedConditionsMustBeNotFulfilled()
        {
            var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.And, new FulfilledTestCondition()).WithRelatedCondition(ConditionRelation.And, new NotFulfilledTestCondition());

            condition.Validate().ShouldBeEquivalentTo(ConditionState.NotFulfilled);
        }
Пример #7
0
 public void FulfilledCondition_AND_NotFulfilledCondition_ShouldBeNotFulfilled()
 {
     var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.And,  new NotFulfilledTestCondition());
     condition.Validate().ShouldBeEquivalentTo(ConditionState.NotFulfilled);
 }
Пример #8
0
 public void ConditionWithMultipleRelatedConditionsMustBeNotFulfilled()
 {
     var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.And, new FulfilledTestCondition()).WithRelatedCondition(ConditionRelation.And, new NotFulfilledTestCondition());
     condition.Validate().ShouldBeEquivalentTo(ConditionState.NotFulfilled);
 }
Пример #9
0
 public void FulfilledCondition_ORNOT_FulfilledCondition_ShouldBeNotFulfilled()
 {
     var condition = new FulfilledTestCondition().WithRelatedCondition(ConditionRelation.OrNot, new FulfilledTestCondition());
     condition.Validate().ShouldBeEquivalentTo(ConditionState.Fulfilled);
 }