Example #1
0
        public static void True(Image mainImage, Image subImage, string condition)
        {
            bool findResult = ImageWorker.IsSubImageExist(mainImage, subImage);

            if (findResult)
            {
                message = $"Assertion :: {condition} :: PASSED";
                ImageWorker.FindSubImageAndSaveResultIntoFile(mainImage, subImage, $"{ProjectPathHelper.DesktopPath}/{condition}PASS.png");
                Logger.Instance.Info($"Assertion :: {condition} :: PASSED");
            }
            else
            {
                message = $"Assertion :: {condition} :: FAILED";
                ImageWorker.TakeScreenshot($"{condition}FAIL");
                NUnit.Framework.Assert.True(findResult, message);
            }
        }
Example #2
0
 public void FindSubImageTest()
 {
     ImageWorker.FindSubImageAndSaveResultIntoFile(DesktopPath, WinPath);
 }