boolean hasPath() { return !isEmpty(path); }
private static void validateIsNotNullOrEmpty(String name) { if (name == null) throw new NullPointerException("The name of the method to access should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the method to access should not be empty"); }
private static void validateIsNotNullOrEmpty(String name) { if (name == null) throw new NullPointerException("The name of the static inner class to access should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the static inner class to access should not be empty"); }
private static void validateIsNotNullOrEmpty(String name) { if (name == null) throw new NullPointerException("The name of the field to access should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the field to access should not be empty"); }
private static void validateIsNotNullOrEmpty(String name) { if (name == null) throw new NullPointerException("The name of the property to access should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the property to access should not be empty"); }
private static void validateIsNotNullOrEmpty(String name) { if (name == null) throw new NullPointerException("The name of the static method to access should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the static method to access should not be empty"); }
private static void validateIsNotNullOrEmpty(String name) { if (name == null) throw new NullPointerException("The name of the static field to access should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the static field to access should not be empty"); }
/** * Creates a new <code>{@link Type}</code>: the starting point of the fluent interface for loading classes dynamically. * @param name the name of the class to load. * @return the created <code>Type</code>. * @throws NullPointerException if the given name is <code>null</code>. * @throws IllegalArgumentException if the given name is empty. */ public static Type newType(String name) { if (name == null) throw new NullPointerException("The name of the class to load should not be null"); if (isEmpty(name)) throw new IllegalArgumentException("The name of the class to load should not be empty"); return new Type(name); }
/** * When a test fails, this method takes a screenshot of the desktop and adds an hyperlink to the screenshot it in the * HTML test report. * @param result contains information about the failing test. */ @Override public void onTestFailure(ITestResult result) { if (!ready || !isGUITest(result)) return; String screenshotFileName = takeScreenshotAndReturnFileName(result); if (isEmpty(screenshotFileName)) return; logger.info(concat("Screenshot of desktop saved as: ", quote(screenshotFileName))); Reporter.setCurrentTestResult(result); Reporter.log(concat("<a href=\"", screenshotFileName, "\">Screenshot</a>")); }