|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jomc.ant.test.support.Assert
public abstract class Assert
Provides static methods for testing various assertions related to Ant executions.
Constructor Summary | |
---|---|
Assert()
Creates a new Assert instance. |
Method Summary | |
---|---|
static void |
assertException(AntExecutionResult result,
Class<? extends Throwable> exception)
Tests an Ant execution to have thrown an exception of a given type. |
static void |
assertException(AntExecutionResult result,
Class<? extends Throwable> exception,
CharSequence reason)
Tests an Ant execution to have thrown an exception of a given type taking a reason. |
static void |
assertExceptionInstance(AntExecutionResult result,
Class<? extends Throwable> exception)
Tests an Ant execution to have thrown an instance of a given exception. |
static void |
assertExceptionInstance(AntExecutionResult result,
Class<? extends Throwable> exception,
CharSequence reason)
Tests an Ant execution to have thrown an instance of a given exception taking a reason. |
static void |
assertExceptionMessage(AntExecutionResult result,
CharSequence message)
Tests an Ant execution to have thrown an exception with a given message. |
static void |
assertExceptionMessage(AntExecutionResult result,
CharSequence message,
CharSequence reason)
Tests an Ant execution to have thrown an exception with a given message taking a reason. |
static void |
assertExceptionMessageContaining(AntExecutionResult result,
CharSequence needle)
Tests an Ant execution to have thrown an exception with a message containing a given string. |
static void |
assertExceptionMessageContaining(AntExecutionResult result,
CharSequence needle,
CharSequence reason)
Tests an Ant execution to have thrown an exception with a message containing a given string taking a reason. |
static void |
assertMessageLogged(AntExecutionResult result,
CharSequence message)
Tests an Ant execution to have fired a messageLogged event holding a given message. |
static void |
assertMessageLogged(AntExecutionResult result,
CharSequence message,
CharSequence reason)
Tests an Ant execution to have fired a messageLogged event holding a given message taking a reason. |
static void |
assertMessageLogged(AntExecutionResult result,
CharSequence message,
int priority)
Tests an Ant execution to have fired a messageLogged event holding a given message with a given priority. |
static void |
assertMessageLogged(AntExecutionResult result,
CharSequence message,
int priority,
CharSequence reason)
Tests an Ant execution to have fired a messageLogged event holding a given message with a given priority
taking a reason. |
static void |
assertMessageLoggedContaining(AntExecutionResult result,
CharSequence needle)
Tests an Ant execution to have fired a messageLogged event holding a message containing a given text. |
static void |
assertMessageLoggedContaining(AntExecutionResult result,
CharSequence needle,
CharSequence reason)
Tests an Ant execution to have fired a messageLogged event holding a message containing a given text
taking a reason. |
static void |
assertMessageLoggedContaining(AntExecutionResult result,
CharSequence needle,
int priority)
Tests an Ant execution to have fired a messageLogged event holding a message containing a given text with
a given priority. |
static void |
assertMessageLoggedContaining(AntExecutionResult result,
CharSequence needle,
int priority,
CharSequence reason)
Tests an Ant execution to have fired a messageLogged event holding a message containing a given text with
a given priority taking a reason. |
static void |
assertMessageNotLogged(AntExecutionResult result,
CharSequence message)
Tests an Ant execution to not have fired a messageLogged event holding a given message. |
static void |
assertMessageNotLogged(AntExecutionResult result,
CharSequence message,
CharSequence reason)
Tests an Ant execution to not have fired a messageLogged event holding a given message taking a reason. |
static void |
assertMessageNotLoggedContaining(AntExecutionResult result,
CharSequence needle)
Tests an Ant execution to not have fired a messageLogged event holding a message containing a given text. |
static void |
assertMessageNotLoggedContaining(AntExecutionResult result,
CharSequence needle,
CharSequence reason)
Tests an Ant execution to not have fired a messageLogged event holding a message containing a given text
taking a reason. |
static void |
assertNoException(AntExecutionResult result)
Tests an Ant execution to not have thrown an exception. |
static void |
assertNoException(AntExecutionResult result,
CharSequence reason)
Tests an Ant execution to not have thrown an exception taking a reason. |
static void |
assertSystemErrorContaining(AntExecutionResult result,
CharSequence needle)
Tests an Ant execution to have written a given text to the system error stream. |
static void |
assertSystemErrorContaining(AntExecutionResult result,
CharSequence needle,
CharSequence reason)
Tests an Ant execution to have written a given text to the system error stream taking a reason. |
static void |
assertSystemOutputContaining(AntExecutionResult result,
CharSequence needle)
Tests an Ant execution to have written a given text to the system output stream. |
static void |
assertSystemOutputContaining(AntExecutionResult result,
CharSequence needle,
CharSequence reason)
Tests an Ant execution to have written a given text to the system output stream taking a reason. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Assert()
Assert
instance.
Method Detail |
---|
public static void assertException(AntExecutionResult result, Class<? extends Throwable> exception)
result
- The result to test.exception
- The class of the expected exception.public static void assertException(AntExecutionResult result, Class<? extends Throwable> exception, CharSequence reason)
result
- The result to test.exception
- The class of the expected exception.reason
- The reason describing why exception
should have been thrown.public static void assertExceptionInstance(AntExecutionResult result, Class<? extends Throwable> exception)
result
- The result to test.exception
- The class the expected exception should be an instance of.public static void assertExceptionInstance(AntExecutionResult result, Class<? extends Throwable> exception, CharSequence reason)
result
- The result to test.exception
- The class the expected exception should be an instance of.reason
- The reason describing why exception
should have been thrown.public static void assertExceptionMessage(AntExecutionResult result, CharSequence message)
result
- The result to test.message
- The message of the expected exception.public static void assertExceptionMessage(AntExecutionResult result, CharSequence message, CharSequence reason)
result
- The result to test.message
- The message of the expected exception.reason
- The reason describing why exception
should have been thrown.public static void assertExceptionMessageContaining(AntExecutionResult result, CharSequence needle)
result
- The result to test.needle
- The text the message of the expected exception should contain.public static void assertExceptionMessageContaining(AntExecutionResult result, CharSequence needle, CharSequence reason)
result
- The result to test.needle
- The text the message of the expected exception should contain.reason
- The reason describing why exception
should have been thrown.public static void assertNoException(AntExecutionResult result)
result
- The result to test.public static void assertNoException(AntExecutionResult result, CharSequence reason)
result
- The result to test.reason
- The reason describing why the execution should not have thrown an exception.public static void assertSystemOutputContaining(AntExecutionResult result, CharSequence needle)
result
- The result to test.needle
- The text which should have been written to the system output stream.public static void assertSystemOutputContaining(AntExecutionResult result, CharSequence needle, CharSequence reason)
result
- The result to test.needle
- The text which should have been written to the system output stream.reason
- The reason describing why needle
should have been written to the system output stream.public static void assertSystemErrorContaining(AntExecutionResult result, CharSequence needle)
result
- The result to test.needle
- The text which should have been written to the system error stream.public static void assertSystemErrorContaining(AntExecutionResult result, CharSequence needle, CharSequence reason)
result
- The result to test.needle
- The text which should have been written to the system error stream.reason
- The reason describing why needle
should have been written to the system error stream.public static void assertMessageLogged(AntExecutionResult result, CharSequence message)
messageLogged
event holding a given message.
result
- The result to test.message
- The message which should have been logged.public static void assertMessageLogged(AntExecutionResult result, CharSequence message, CharSequence reason)
messageLogged
event holding a given message taking a reason.
result
- The result to test.message
- The message which should have been logged.reason
- The reason describing why message
should have been logged.public static void assertMessageLogged(AntExecutionResult result, CharSequence message, int priority)
messageLogged
event holding a given message with a given priority.
result
- The result to test.message
- The message which should have been logged.priority
- The priority the message should have been logged with.public static void assertMessageLogged(AntExecutionResult result, CharSequence message, int priority, CharSequence reason)
messageLogged
event holding a given message with a given priority
taking a reason.
result
- The result to test.message
- The message which should have been logged.priority
- The priority the message should have been logged with.reason
- The reason describing why message
should have been logged.public static void assertMessageLoggedContaining(AntExecutionResult result, CharSequence needle)
messageLogged
event holding a message containing a given text.
result
- The result to test.needle
- The text contained in a message which should have been logged.public static void assertMessageLoggedContaining(AntExecutionResult result, CharSequence needle, CharSequence reason)
messageLogged
event holding a message containing a given text
taking a reason.
result
- The result to test.needle
- The text contained in a message which should have been logged.reason
- The reason describing why needle
should have been logged.public static void assertMessageLoggedContaining(AntExecutionResult result, CharSequence needle, int priority)
messageLogged
event holding a message containing a given text with
a given priority.
result
- The result to test.needle
- The text contained in a message which should have been logged.priority
- The priority the message should have been logged with.public static void assertMessageLoggedContaining(AntExecutionResult result, CharSequence needle, int priority, CharSequence reason)
messageLogged
event holding a message containing a given text with
a given priority taking a reason.
result
- The result to test.needle
- The text contained in a message which should have been logged.priority
- The priority the message should have been logged with.reason
- The reason describing why message
should have been logged.public static void assertMessageNotLogged(AntExecutionResult result, CharSequence message)
messageLogged
event holding a given message.
result
- The result to test.message
- The message which should not have been logged.public static void assertMessageNotLogged(AntExecutionResult result, CharSequence message, CharSequence reason)
messageLogged
event holding a given message taking a reason.
result
- The result to test.message
- The message which should not have been logged.reason
- The reason describing why message
should not have been logged.public static void assertMessageNotLoggedContaining(AntExecutionResult result, CharSequence needle)
messageLogged
event holding a message containing a given text.
result
- The result to test.needle
- The text contained in a message which should not have been logged.public static void assertMessageNotLoggedContaining(AntExecutionResult result, CharSequence needle, CharSequence reason)
messageLogged
event holding a message containing a given text
taking a reason.
result
- The result to test.needle
- The text contained in a message which should not have been logged.reason
- The reason describing why message
should not have been logged.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2005-2012 The JOMC Project. All Rights Reserved. |