Ejemplo n.º 1
0
        public void CreateGrayImages()
        {
            string testScreenPath = quizImgDir + "\\10.png";
            Bitmap testScreen     = new Bitmap(testScreenPath);

            string quizPattern = QuizSolver.ANGELMON;

            //Assert.AreEqual(QuizSolver.BOSS, quizPattern);

            string actual = "";

            for (int i = 1; i <= 8; i++)
            {
                (Point point, Bitmap img)answer = QuizSolver.GetAnswer(testScreen, i);
                if (QuizSolver.IsCorrectAnswer(answer, quizPattern, 1280, 720))
                {
                    actual += i;
                    //emulator.Click(answer.point);
                }
            }
        }
Ejemplo n.º 2
0
        public void TestCorrectAnswerAngelmon()
        {
            string testScreenPath = quizImgDir + "\\2.png";
            Bitmap testScreen     = new Bitmap(testScreenPath);

            string quizPattern = QuizSolver.GetQuizPattern(testScreen, 1920, 1080);

            Assert.AreEqual(QuizSolver.ANGELMON, quizPattern);

            string actual = "";

            for (int i = 1; i <= 8; i++)
            {
                (Point point, Bitmap img)answer = QuizSolver.GetAnswer(testScreen, i);
                if (QuizSolver.IsCorrectAnswer(answer, quizPattern, 1920, 1080))
                {
                    actual += i;
                    //emulator.Click(answer.point);
                }
            }
            string expected = "136";

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
        public void TestCorrectAnswerEllia()
        {
            string testScreenPath = quizImgDir + "\\9.png";
            Bitmap testScreen     = new Bitmap(testScreenPath);

            string quizPattern = QuizSolver.GetQuizPattern(testScreen, 1280, 720);

            Assert.AreEqual(QuizSolver.ELLIA, quizPattern);

            string actual = "";

            for (int i = 1; i <= 8; i++)
            {
                (Point point, Bitmap img)answer = QuizSolver.GetAnswer(testScreen, i);
                if (QuizSolver.IsCorrectAnswer(answer, quizPattern, 1280, 720))
                {
                    actual += i;
                    //emulator.Click(answer.point);
                }
            }
            string expected = "35";

            Assert.AreEqual(expected, actual);
        }