Пример #1
0
        public void TouchLimit_EqualsTest_Null_Check()
        {
            // The type we are testing
            TouchLimit target = new TouchLimit();

            //We expect the equals to fail, as there is nothing to equal with
            bool expected = false;
            bool actual = target.Equals(null);

            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void TouchLimit_EqualsTest_False_Test()
        {
            // The type we are testing
            TouchLimit target = new TouchLimit()
            {
                Min = 3,
                Max = 5
            };

            // A second rule
            IPrimitiveConditionData anotherRuleData = new TouchLimit()
            {

                Min = 3,
                Max = 6
            };

            //We expect the equals to fail, as there is nothing to equal with
            bool expected = false;
            bool actual = target.Equals(anotherRuleData);

            //Assert they are equal
            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        public void TouchLimit_EqualsTest_True_Test()
        {
            // The type we are testing
            TouchLimit target = new TouchLimit()
            {
                Min = 3,
                Max = 5
            };

            // A second rule
            IPrimitiveConditionData anotherRuleData = new TouchLimit()
            {

                Min = 3,
                Max = 5
            };

            //We expect the equals to be true, as the min/max are the same
            bool expected = true;
            bool actual = target.Equals(anotherRuleData);

            //Assert they are equal
            Assert.AreEqual(expected, actual);
        }