Exemple #1
0
 public void ClosedLoop_state_get_and_set_work()
 {
     ClosedLoop target = new ClosedLoop();
     target.State = "false";
     string expected = "false";
     string actual = target.State;
     Assert.AreEqual(expected, actual);
 }
Exemple #2
0
 public void ClosedLoop_ToGDL_true_test()
 {
     ClosedLoop target = new ClosedLoop();
     target.State = "true";
     string expected = "Closed loop";
     string actual;
     actual = target.ToGDL();
     Assert.AreEqual(expected, actual);
 }
Exemple #3
0
 public void ClosedLoop_ToGDL_other_test()
 {
     ClosedLoop target = new ClosedLoop();
     target.State = "false";
     string expected = string.Empty;
     string actual;
     actual = target.ToGDL();
     Assert.AreEqual(expected, actual);
 }
 public void Init(IPrimitiveConditionData ruleData)
 {
     _data = ruleData as ClosedLoop;
 }
Exemple #5
0
        public void ClosedLoop_union_false_and_true_gives_false()
        {
            ClosedLoop target = new ClosedLoop()
            {
                State = "false"
            };
            ClosedLoop input = new ClosedLoop()
            {
                State = "true"
            };

            target.Union(input);
            string expected = "false";
            string actual = target.State;
            Assert.AreEqual(expected, actual);
        }
Exemple #6
0
 public void ClosedLoop_union_different_type_throws_exception()
 {
     ClosedLoop target = new ClosedLoop();
     EnclosedArea input = new EnclosedArea();
     target.Union(input);
 }
Exemple #7
0
 public void ClosedLoop_Union_null_throws_exception()
 {
     ClosedLoop target = new ClosedLoop();
     IPrimitiveConditionData value = null;
     target.Union(value);
 }
Exemple #8
0
 public void TouchArea_union_different_type_throws_exception()
 {
     TouchArea target = new TouchArea();
     ClosedLoop input = new ClosedLoop();
     target.Union(input);
 }
 public void TouchPathBoundingBox_union_different_type_throws_exception()
 {
     TouchPathBoundingBox target = new TouchPathBoundingBox();
     ClosedLoop value = new ClosedLoop();
     target.Union(value);
 }
        public void EqualsTest_Different_Types_of_RuleData()
        {
            // The type we are testing
            DistanceBetweenPoints target = new DistanceBetweenPoints()
            {
                Behaviour = BehaviourTypes.Increasing,
                Max = -1,
                Min = -1
            };

            // Any random type - just not the type that we are testing
            IPrimitiveConditionData anotherRuleData = new ClosedLoop();

            // Since the ruleData are of different type, it should not be equal
            bool expected = false;
            bool actual = target.Equals(anotherRuleData);

            Assert.AreEqual(expected, actual, "Different types of rules should not match!");
        }