org.testng
Class FileAssert

java.lang.Object  extended by org.testng.FileAssert

public class FileAssert
extends Object

Assertion tool for File centric assertions. Conceptually this is an extension of Assert Presents assertion methods with a more natural parameter order. The order is always actualValue, expectedValue [, message].

Since:
5.6
Version:
$Revision: 650 $, $Date: 2009-01-05 03:51:54 -0800 (Mon, 05 Jan 2009) $
Author:
Paul Mendelon


Method Summary
static voidassertDirectory(File tstvalue)
           
static voidassertDirectory(File tstvalue, String message)
          Asserts that a tstvalue is a proper directory.
static voidassertFile(File tstvalue)
           
static voidassertFile(File tstvalue, String message)
          Asserts that a tstvalue is a proper directory.
static voidassertLength(File tstvalue, long expected)
           
static voidassertLength(File tstvalue, long expected, String message)
          Asserts that a tstvalue is a file of exactly expected characters or a directory of exactly expected entries.
static voidassertMaxLength(File tstvalue, long expected)
           
static voidassertMaxLength(File tstvalue, long expected, String message)
          Asserts that a tstvalue is a file of at most expected characters or a directory of at most expected entries.
static voidassertMinLength(File tstvalue, long expected)
           
static voidassertMinLength(File tstvalue, long expected, String message)
          Asserts that a tstvalue is a file of at least expected characters or a directory of at least expected entries.
static voidassertReadable(File tstvalue)
           
static voidassertReadable(File tstvalue, String message)
          Asserts that a tstvalue is readable.
static voidassertReadWrite(File tstvalue)
           
static voidassertReadWrite(File tstvalue, String message)
          Asserts that a tstvalue is readable and writeable.
static voidassertWriteable(File tstvalue)
           
static voidassertWriteable(File tstvalue, String message)
          Asserts that a tstvalue is writeable.
static voidfail()
          Fails a test with no message.
static voidfail(String message)
          Fails a test with the given message.
static voidfail(String message, Throwable realCause)
          Fails a test with the given message and wrapping the original exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertDirectory

public static void assertDirectory(File tstvalue,                                   String message)
Asserts that a tstvalue is a proper directory. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertDirectory

public static void assertDirectory(File tstvalue)

assertFile

public static void assertFile(File tstvalue,                              String message)
Asserts that a tstvalue is a proper directory. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertFile

public static void assertFile(File tstvalue)
See Also:
assertFile(File, String)

assertLength

public static void assertLength(File tstvalue,                                long expected,                                String message)
Asserts that a tstvalue is a file of exactly expected characters or a directory of exactly expected entries. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertLength

public static void assertLength(File tstvalue,                                long expected)
See Also:
assertLength(File, long, String)

assertMinLength

public static void assertMinLength(File tstvalue,                                   long expected,                                   String message)
Asserts that a tstvalue is a file of at least expected characters or a directory of at least expected entries. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertMinLength

public static void assertMinLength(File tstvalue,                                   long expected)
See Also:
assertMinLength(File, long, String)

assertMaxLength

public static void assertMaxLength(File tstvalue,                                   long expected,                                   String message)
Asserts that a tstvalue is a file of at most expected characters or a directory of at most expected entries. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertMaxLength

public static void assertMaxLength(File tstvalue,                                   long expected)
See Also:
assertMaxLength(File, long, String)

assertReadable

public static void assertReadable(File tstvalue,                                  String message)
Asserts that a tstvalue is readable. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertReadable

public static void assertReadable(File tstvalue)
See Also:
assertReadable(File, String)

assertWriteable

public static void assertWriteable(File tstvalue,                                   String message)
Asserts that a tstvalue is writeable. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertWriteable

public static void assertWriteable(File tstvalue)
See Also:
assertWriteable(File, String)

assertReadWrite

public static void assertReadWrite(File tstvalue,                                   String message)
Asserts that a tstvalue is readable and writeable. If it isn't, an AssertionError, with the given message, is thrown.

Parameters:
tstvalue - the file to evaluate
message - the assertion error message

assertReadWrite

public static void assertReadWrite(File tstvalue)
See Also:
assertReadWrite(File, String)

fail

public static void fail(String message,                        Throwable realCause)
Fails a test with the given message and wrapping the original exception.

Parameters:
message - the assertion error message
realCause - the original exception

fail

public static void fail(String message)
Fails a test with the given message.

Parameters:
message - the assertion error message

fail

public static void fail()
Fails a test with no message.



Copyright © 2012. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14