Esempio n. 1
0
        public void InfoCalculator_Null_Input_Test()
        {
            InfoCalculator target = new InfoCalculator();
            ValidSetOfTouchPoints set = null;

            Info actual = target.Calculate(set) as Info;
            Assert.IsTrue(actual.Message == string.Empty);
        }
Esempio n. 2
0
        public void InfoCalculator_Valid_Input_Test()
        {
            //Setup preamble for 2 touchpoints to be used in calculate

            TouchInfo ti1 = new TouchInfo();
            ti1.TouchDeviceId = 2;
            ti1.ActionType = TouchAction2.Down;
            ti1.Position = new Point(1, 6);

            TouchInfo ti2 = new TouchInfo();
            ti2.TouchDeviceId = 2;
            ti2.ActionType = TouchAction2.Down;
            ti2.Position = new Point(2, 5);

            ValidSetOfTouchPoints test = new ValidSetOfTouchPoints();
            test.Add(new TouchPoint2(ti1, new UIElement()));
            test.Add(new TouchPoint2(ti2, new UIElement()));

            //Call appropriate methods to test the calculate
            InfoCalculator target = new InfoCalculator();
            Info result = target.Calculate(test) as Info;

            Assert.IsTrue(result.Message == string.Empty);
        }
Esempio n. 3
0
        public void InfoCalculator_Constructor_Test()
        {
            InfoCalculator target = new InfoCalculator();

            Assert.IsTrue(target.Message == string.Empty);
        }