Arquillian Drone Extension Support for Selenium Server 1.0.0.CR3

org.jboss.arquillian.drone.selenium.server.impl
Class Validate

java.lang.Object
  extended by org.jboss.arquillian.drone.selenium.server.impl.Validate

public final class Validate
extends Object

Validate Validation utility

Version:
$Revision: $
Author:
Aslak Knutsen

Method Summary
static void isInReadableDirectory(String path, String message)
           
static boolean isNotNullOrEmpty(String string)
          Checks that the specified String is not null or empty.
static void isValidFile(String path, String message)
           
static void notNull(Object obj, String message)
          Checks that object is not null, throws exception if it is.
static void notNullOrEmpty(String string, String message)
          Checks that the specified String is not null or empty, throws exception if it is.
static void stateNotNull(Object obj, String message)
          Checks that obj is not null, throws exception if it is.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

notNull

public static void notNull(Object obj,
                           String message)
                    throws IllegalArgumentException
Checks that object is not null, throws exception if it is.

Parameters:
obj - The object to check
message - The exception message
Throws:
IllegalArgumentException - Thrown if obj is null

notNullOrEmpty

public static void notNullOrEmpty(String string,
                                  String message)
                           throws IllegalArgumentException
Checks that the specified String is not null or empty, throws exception if it is.

Parameters:
string - The object to check
message - The exception message
Throws:
IllegalArgumentException - Thrown if obj is null

isNotNullOrEmpty

public static boolean isNotNullOrEmpty(String string)
                                throws IllegalArgumentException
Checks that the specified String is not null or empty.

Parameters:
string - The object to check
Returns:
true if string is not empty, false otherwise
Throws:
IllegalArgumentException

stateNotNull

public static void stateNotNull(Object obj,
                                String message)
                         throws IllegalStateException
Checks that obj is not null, throws exception if it is.

Parameters:
obj - The object to check
message - The exception message
Throws:
IllegalStateException - Thrown if obj is null

isValidFile

public static void isValidFile(String path,
                               String message)
                        throws IllegalArgumentException
Throws:
IllegalArgumentException

isInReadableDirectory

public static void isInReadableDirectory(String path,
                                         String message)
                                  throws IllegalArgumentException
Throws:
IllegalArgumentException

Arquillian Drone Extension Support for Selenium Server 1.0.0.CR3

Copyright © 2011 JBoss by Red Hat. All Rights Reserved.