public void BottomMenuBar1080X1920Correction()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "BottomMenuBar-Boss-1080x1920.jpg");
                Assert.AreEqual(".raids add \"St. Johanns-Tor\" \"Walraisa\" 23:36", text, true);

                text = GetOcrResultString(ocrService, "BottomMenuBar-Egg5-1080x1920.jpg");
                Assert.AreEqual(".raids add \"Spalentor\" \"5\" 28:28", text, true);

                text = GetOcrResultString(ocrService, "BottomMenuBar-Egg4-1080x1920.jpg");
                Assert.AreEqual(".raids add \"Organspender Gedenkstein\" \"4\" 36:21", text, true);

                text = GetOcrResultString(ocrService, "BossWithMenu1080X1920.png");
                Assert.AreEqual(".raids add \"International Imaginary Museum\" \"Kokowei\" 34:55", text, true);

                text = GetOcrResultString(ocrService, "GymNameNotRecognized1080X1920.jpg");
                Assert.AreEqual(".raids add \"Kleinbasler Basiliskenbrünnchen\" \"5\" 37:51", text, true);

                text = GetOcrResultString(ocrService, "BottomBarSmall1080x1920Level5.jpg");
                Assert.AreEqual(".raids add \"FC Münchenstein Sportanlage AU\" \"5\" 22:24", text, true);

                // TODO: No idea how, but the gym name has to be made more readable
                //text = GetOcrResultString(ocrService, "1080x1920WrongGymNameDetected.jpg");
                //Assert.AreEqual(".raids add \"Monument de Strasbourg (Elisabethenanlage)\" \"Blitza\" 22:38", text, true);
            }
        }
예제 #2
0
        public void Ric1080X2160BottomBar()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "1080x2160Level4Instead5.png");
                Assert.AreEqual(".raids add \"des Zeichners Zeichnung\" \"5\" 23:17", text, true);

                // The gyms for the following tests do not exist, so just test the results on their own
                var interactiveResult = GetOcrResult(ocrService, "DortmundLevel5Egg.jpg");
                Assert.AreEqual(interactiveResult.Result.EggLevel.GetFirst(), 5);
                Assert.AreEqual(interactiveResult.Result.EggTimer.GetFirst(), new TimeSpan(0, 54, 17));

                interactiveResult = GetOcrResult(ocrService, "DortmundLevel4Egg.jpg");
                Assert.AreEqual(interactiveResult.Result.EggLevel.GetFirst(), 4);
                Assert.AreEqual(interactiveResult.Result.EggTimer.GetFirst(), new TimeSpan(0, 3, 19));

                interactiveResult = GetOcrResult(ocrService, "DortmundBossMeditie.jpg");
                Assert.AreEqual(interactiveResult.Result.Pokemon.OcrValue, "Meditie");
                Assert.AreEqual(interactiveResult.Result.RaidTimer.GetFirst(), new TimeSpan(0, 13, 40));

                interactiveResult = GetOcrResult(ocrService, "BottomMenu1080x2160Boss.png");
                Assert.AreEqual(interactiveResult.Result.Pokemon.OcrValue, "Walraisa");
                Assert.AreEqual(interactiveResult.Result.RaidTimer.GetFirst(), new TimeSpan(0, 35, 31));
            }
        }
예제 #3
0
 public void WithoutMenu1440X2960()
 {
     using (var context = new Hydro74000Context(ContextOptions))
     {
         var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
         var text       = GetOcrResultString(ocrService, "1440x2960RaidNichtErkannt.jpg");
         Assert.AreEqual(".raids add \"ABB Toro\" \"5\" 48:27", text, true);
     }
 }
예제 #4
0
 public void BottomMenu1080X2240()
 {
     using (var context = new Hydro74000Context(ContextOptions))
     {
         var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
         var text       = GetOcrResultString(ocrService, "1080x2240RaidNichtErkannt.jpg");
         Assert.AreEqual(".raids add \"Evang. Meth. Kirche Allschwilerplatz\" \"5\" 6:18", text, true);
     }
 }
예제 #5
0
 public void BottomMenu1440X2960()
 {
     using (var context = new Hydro74000Context(ContextOptions))
     {
         var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
         var text       = GetOcrResultString(ocrService, "GalaxyS9WithMenu.jpg");
         Assert.AreEqual(".raids add \"Einheitskreis Skulptur\" \"Amonitas\" 27:5", text, true);
     }
 }
예제 #6
0
 public void WithoutMenu1080X2220()
 {
     using (var context = new Hydro74000Context(ContextOptions))
     {
         var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
         var text       = GetOcrResultString(ocrService, "Egg1080x2220.jpg");
         Assert.AreEqual(".raids add \"Moderne Konferenz\" \"5\" 55:9", text, true);
     }
 }
 public void NullRefException()
 {
     using (var context = new Hydro74000Context(ContextOptions))
     {
         var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
         // The problem here was a to strict BinaryTreshold where the bot would not recognize the gym name anymore
         var text = GetOcrResultString(ocrService, "NullRefException1.jpg");
         Assert.AreEqual(".raids add \"Die Venus in den Büschen\" \"4\" 49:48", text, true);
     }
 }
 public void BottomMenu900X1600()
 {
     using (var context = new Hydro74000Context(ContextOptions))
     {
         var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
         Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
         var text = GetOcrResultString(ocrService, "Nexus900x1600Boss.png");
         Assert.AreEqual(".raids add \"Helix Fountain\" \"Snorunt\" 41:40", text, true);
     }
 }
예제 #9
0
        public void BothMenu1080X2220()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "HoOh1080X2220.jpg");
                Assert.AreEqual(".raids add \"Warmbacher Kreuz\" \"Ho-Oh\" 25:41", text, true);

                text = GetOcrResultString(ocrService, "BothMenu1080X2220Egg.jpg");
                Assert.AreEqual(".raids add \"Jeckenbrunnen\" \"1\" 51:3", text, true);
            }
        }
        public void WithoutMenuBar1080X1920Correction()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                //TODO: Get a better picture with visible raid timer
                //var text = GetOcrResult(ocrService, basePath + "Boss1080X2220.jpg", engine);
                //Assert.AreEqual(".raids add \"The Gate\" \"Sniebel\" ??:31", text, true);

                var text = GetOcrResultString(ocrService, "WithoutMenu1080x1920.jpg");
                Assert.AreEqual(".raids add \"St. Johanns Ring Antique House\" \"2\" 40:13", text, true);
            }
        }
예제 #11
0
        public void WithHotspot750X1334()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "OpenHotSpot750X1334.png");
                Assert.AreEqual(".raids add \"Regenbogen Kreis\" \"5\" 52:55", text, true);

                text = GetOcrResultString(ocrService, "Ntx750X1334WithHotspot.png");
                // This a screenshot from a different map, so no chance to find the right gym
                // But the screenshot is correctly recognized as raid image
                Assert.AreEqual("8 Arenen gefunden die das Wortfragment \"Leonard\'s Museum\" enthalten. Bitte formuliere den Namen etwas exakter aus, maximal 4 dürfen übrig bleiben für den interaktiven Modus.", text, true);
            }
        }
예제 #12
0
        public void BottomMenu720X1280()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "BottomMenu720x1280_Egg.png");
                Assert.AreEqual(".raids add \"Triple slider\" \"2\" 43:1", text, true);

                text = GetOcrResultString(ocrService, "BottomMenu720x1280_Boss.png");
                Assert.AreEqual(".raids add \"Spielplatz Erlenmatt\" \"Tyracroc\" 23:12", text, true);

                text = GetOcrResultString(ocrService, "720x1280Egg5.jpg");
                Assert.AreEqual(".raids add \"La Tour De L\'Hôtel De L\'Europe\" \"5\" 10:4", text, true);
            }
        }
예제 #13
0
        public void BottomMenu1080X2220()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "ZurLandskrone-Karpador.jpg");
                Assert.AreEqual(".raids add \"Zur Landskron\" \"Karpador\" 10:1", text, true);

                text = GetOcrResultString(ocrService, "Egg1080X2220Herwig.jpg");
                Assert.AreEqual(".raids add \"Skulptur Zwei Schwangere Frauen \" \"4\" 56:54", text, true);

                text = GetOcrResultString(ocrService, "GalaxyS9WithMenu2.jpg");
                Assert.AreEqual(".raids add \"Rheinfelden Bahnhof\" \"5\" 48:59", text, true);

                text = GetOcrResultString(ocrService, "BottomBarAugustaRauricaOsttor1454Egg3.jpg");
                Assert.AreEqual(".raids add \"Augusta Raurica - Osttor\" \"3\" 14:54", text, true);
            }
        }
예제 #14
0
        public void Ric1080X2160WithoutBar()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);

                // The gyms for the following tests do not exist, so just test the results on their own
                var interactiveResult = GetOcrResult(ocrService, "WithoutBottomBarEgg5.jpg");
                Assert.AreEqual(interactiveResult.Result.EggLevel.GetFirst(), 5);
                Assert.AreEqual(interactiveResult.Result.EggTimer.GetFirst(), new TimeSpan(0, 21, 6));

                interactiveResult = GetOcrResult(ocrService, "WithoutBottomBarEgg4.jpg");
                Assert.AreEqual(interactiveResult.Result.EggLevel.GetFirst(), 4);
                Assert.AreEqual(interactiveResult.Result.EggTimer.GetFirst(), new TimeSpan(0, 47, 52));

                interactiveResult = GetOcrResult(ocrService, "WithoutBottomBarBossDespotar.jpg");
                Assert.AreEqual(interactiveResult.Result.Pokemon.OcrValue, "Despotar");
                Assert.AreEqual(interactiveResult.Result.RaidTimer.GetFirst(), new TimeSpan(0, 9, 52));
            }
        }
예제 #15
0
        public void WithoutBar750X1334()
        {
            using (var context = new Hydro74000Context(ContextOptions))
            {
                var ocrService = OcrTestsHelper.GetOcrService(ConfigurationService, context);
                var text       = GetOcrResultString(ocrService, "A la Loko - Kyogre.png");
                Assert.AreEqual(".raids add \"A la Loko\" \"Kyogre\" 8:7", text, true);

                text = GetOcrResultString(ocrService, "Absol-Theilsiefje.png");
                Assert.AreEqual(".raids add \"Theilsiefje Säule\" \"Absol\" 44:24", text, true);

                text = GetOcrResultString(ocrService, "750x1334Level5Egg.png");
                Assert.AreEqual(".raids add \"Gundeldinger Krippe\" \"5\" 28:15", text, true);

                text = GetOcrResultString(ocrService, "750x1334Level4Egg.png");
                Assert.AreEqual(".raids add \"Big Bicycle\" \"4\" 58:5", text, true);

                text = GetOcrResultString(ocrService, "750x1334ArenaName.png");
                Assert.AreEqual(".raids add \"Baum am Holbeinhof\" \"Regice\" 21:25", text, true);
            }
        }
예제 #16
0
 protected OcrService GetOcrService(Hydro74000Context context)
 {
     return(OcrTestsHelper.GetOcrService(ConfigurationService, context));
 }