예제 #1
0
        public void TestDisconnected()
        {
            FakeProcessingContext pc = new FakeProcessingContext();
            TestSwtchAct          ts = new TestSwtchAct(pc, "FindPlaySignin");
            var res = ts.Process();

            Assert.IsTrue(res.finished);
            var goodSteps = TestSwtchAct.switchSteps;

            Assert.AreEqual(pc.mouseMoveAndClick.Count, goodSteps.Count - 1);

            Assert.AreEqual(10, pc.mouseMoveAndClick[0].x);
            Assert.AreEqual(101, pc.mouseMoveAndClick[1].x);
            Assert.AreEqual(107, pc.mouseMoveAndClick[2].x);
        }
예제 #2
0
        public void TestGoodMatch()
        {
            FakeProcessingContext pc = new FakeProcessingContext();
            TestSwtchAct          ts = new TestSwtchAct(pc, null);
            var res = ts.Process();

            Assert.IsTrue(res.finished);
            var goodSteps = TestSwtchAct.switchSteps;

            for (int i = 0; i < goodSteps.Count; i++)
            {
                var tmpl = goodSteps[i];
                Assert.AreEqual(0, pc.mouseMoveTos[i].x);
                Assert.AreEqual(0, pc.mouseMoveTos[i].y);
                Assert.AreEqual(tmpl.xoff, pc.mouseMoveAndClick[i].x);
                Assert.AreEqual(tmpl.yoff, pc.mouseMoveAndClick[i].y);
            }
        }