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); } }
public void FindSubImageTest() { ImageWorker.FindSubImageAndSaveResultIntoFile(DesktopPath, WinPath); }