Пример #1
0
 /**
  * This method scans StringBuilder instance to have any string. In case it find one or more, it
  * throws AssertionError to mark test method failed.
  *
  * @param sb Instance of StringBuilder class.
  */
 public void assertEmpty(StringBuilder sb) {
   if (sb.length() > 0) {
     lastTestMethodResult = false;
     logger.info("There are few assertion errors.");
     // selenium.logAssertion("All Failed Assertions", sb.toString(), "");
     com.tbb.logging.LoggingAssert.assertTrue(
         "All Failed Assertions" + sb.toString(), sb.length() == 0, selenium);
   }
 }
Пример #2
0
 /**
  * This method has been written to override assertTrue method from LoggingAssert. This method
  * internally call assertSoft method.
  *
  * @param msg Failure Messsage
  * @param condition Condition to check
  * @param selenium instance of LoggingSelenium
  */
 public void assertTrue(String msg, boolean condition, LoggingSelenium selenium) {
   if (assertionMode.equalsIgnoreCase("soft")) assertSoft(condition, msg, messages, selenium);
   else com.tbb.logging.LoggingAssert.assertTrue(msg, condition, selenium);
 }