Exemple #1
0
 public void AreEqual(object expected, object actual, string step)
 {
     TE.BeginTestCaseStep($"Assert: {step}");
     try
     {
         Assert.AreEqual(expected, actual, step);
     }
     catch (AssertionException)
     {
         TE.FailCurrentStep(expected.ToString(), actual.ToString());
         throw;
     }
 }
 public void AssertURLIsWhereExpected(string url, string description)
 {
     executioner.BeginTestCaseStep(description);
     if (!executioner.AmOnScreen(url))
     {
         executioner.FailCurrentStep(description, "Current url does not contain " + url);
         Assert.IsTrue(false, description);
     }
 }
 public void Assertion(bool shouldBeTrue, string description, bool isHardFailure = true)
 {
     if (!shouldBeTrue)
     {
         executioner.FailCurrentStep(description, "");
         if (isHardFailure)
         {
             Assert.IsTrue(shouldBeTrue, description);
         }
     }
 }