public void ExtractAlliedHeroMugshotsByScreenShot() { var loadMugshotLocations = JsonConfigLoader.GetMugshotLocations(); var extractHeroMugshotsByScreenShot = HeroMugshotBitmapExtractor.ExtractHeroMugshotsByScreenShot( (Bitmap)Bitmap.FromFile( FakeScreenShotPath), loadMugshotLocations.AlliedLocationPoints, loadMugshotLocations.PortraitWidth, loadMugshotLocations.PortraitHeight); Assert.True(extractHeroMugshotsByScreenShot.Any()); }
public void IdentifyAllEnemyHeroesByScreenShot() { HeroMugshotIdentifier heroMugshotIdentifier = new HeroMugshotIdentifier(); var loadMugshotLocations = JsonConfigLoader.GetMugshotLocations(); var extractHeroMugshotsByScreenShot = HeroMugshotBitmapExtractor.ExtractHeroMugshotsByScreenShot( (Bitmap)Bitmap.FromFile( FakeScreenShotPath), loadMugshotLocations.EnemyLocationPoints, loadMugshotLocations.PortraitWidth, loadMugshotLocations.PortraitHeight); List <int> correctMugshotsHeroIdsOnFakeScreenshot = new List <int>() { 17, 18, 19, 1, 17, 12 }; int index = 0; foreach (var mugshot in extractHeroMugshotsByScreenShot) { var heroIdByMugshot = heroMugshotIdentifier.GetHeroIdByMugshot( mugshot, JsonConfigLoader.GetHeroIdMugshotBitmaps()); Assert.True(correctMugshotsHeroIdsOnFakeScreenshot[index] == heroIdByMugshot); index++; } }