org.testng.asserts
Class Assertion

java.lang.Object  extended by org.testng.asserts.Assertion
All Implemented Interfaces:
IAssertLifecycle
Direct Known Subclasses:
LoggingAssert, SoftAssert

public class Assertion
extends Object
implements IAssertLifecycle

An assert class with various hooks allowing its behavior to be modified by subclasses.


Constructor Summary
Assertion()
           
 
Method Summary
 voidassertEquals(boolean actual, boolean expected)
           
 voidassertEquals(boolean actual, boolean expected, String message)
           
 voidassertEquals(byte[] actual, byte[] expected)
           
 voidassertEquals(byte[] actual, byte[] expected, String message)
           
 voidassertEquals(byte actual, byte expected)
           
 voidassertEquals(byte actual, byte expected, String message)
           
 voidassertEquals(char actual, char expected)
           
 voidassertEquals(char actual, char expected, String message)
           
 voidassertEquals(Collection<?> actual, Collection<?> expected)
           
 voidassertEquals(Collection<?> actual, Collection<?> expected, String message)
           
 voidassertEquals(double actual, double expected, double delta)
           
 voidassertEquals(double actual, double expected, double delta, String message)
           
 voidassertEquals(float actual, float expected, float delta)
           
 voidassertEquals(float actual, float expected, float delta, String message)
           
 voidassertEquals(int actual, int expected)
           
 voidassertEquals(int actual, int expected, String message)
           
 voidassertEquals(long actual, long expected)
           
 voidassertEquals(long actual, long expected, String message)
           
 voidassertEquals(Map<?,?> actual, Map<?,?> expected)
           
 voidassertEquals(Object[] actual, Object[] expected)
           
 voidassertEquals(Object[] actual, Object[] expected, String message)
           
 voidassertEquals(Object actual, Object expected)
           
 voidassertEquals(Object actual, Object expected, String message)
           
 voidassertEquals(Set<?> actual, Set<?> expected)
           
 voidassertEquals(Set<?> actual, Set<?> expected, String message)
           
 voidassertEquals(short actual, short expected)
           
 voidassertEquals(short actual, short expected, String message)
           
 voidassertEquals(String actual, String expected)
           
 voidassertEquals(String actual, String expected, String message)
           
 voidassertEqualsNoOrder(Object[] actual, Object[] expected)
           
 voidassertEqualsNoOrder(Object[] actual, Object[] expected, String message)
           
 voidassertFalse(boolean condition)
           
 voidassertFalse(boolean condition, String message)
           
 voidassertNotEquals(double actual, double expected, double delta)
           
 voidassertNotEquals(double actual, double expected, double delta, String message)
           
 voidassertNotEquals(float actual, float expected, float delta)
           
 voidassertNotEquals(float actual, float expected, float delta, String message)
           
 voidassertNotEquals(Object actual, Object expected)
           
 voidassertNotEquals(Object actual, Object expected, String message)
           
 voidassertNotNull(Object object)
           
 voidassertNotNull(Object object, String message)
           
 voidassertNotSame(Object actual, Object expected)
           
 voidassertNotSame(Object actual, Object expected, String message)
           
 voidassertNull(Object object)
           
 voidassertNull(Object object, String message)
           
 voidassertSame(Object actual, Object expected)
           
 voidassertSame(Object actual, Object expected, String message)
           
 voidassertTrue(boolean condition, String message)
           
protected  voiddoAssert(IAssert assertCommand)
           
 voidexecuteAssert(IAssert assertCommand)
          Run the assert command in parameter.
 voidfail()
           
 voidfail(String message)
           
 voidfail(String message, Throwable realCause)
           
 voidonAfterAssert(IAssert assertCommand)
          Invoked after an assert is run.
 voidonAssertFailure(IAssert assertCommand)
          Invoked when an assert fails.
 voidonAssertSuccess(IAssert assertCommand)
          Invoked when an assert succeeds.
 voidonBeforeAssert(IAssert assertCommand)
          Invoked before an assert is run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assertion

public Assertion()
Method Detail

doAssert

protected void doAssert(IAssert assertCommand)

executeAssert

public void executeAssert(IAssert assertCommand)
Run the assert command in parameter. Meant to be overridden by subclasses.

Specified by:
executeAssert in interface IAssertLifecycle

onAssertSuccess

public void onAssertSuccess(IAssert assertCommand)
Invoked when an assert succeeds. Meant to be overridden by subclasses.

Specified by:
onAssertSuccess in interface IAssertLifecycle

onAssertFailure

public void onAssertFailure(IAssert assertCommand)
Invoked when an assert fails. Meant to be overridden by subclasses.

Specified by:
onAssertFailure in interface IAssertLifecycle

onBeforeAssert

public void onBeforeAssert(IAssert assertCommand)
Invoked before an assert is run. Meant to be overridden by subclasses.

Specified by:
onBeforeAssert in interface IAssertLifecycle

onAfterAssert

public void onAfterAssert(IAssert assertCommand)
Invoked after an assert is run. Meant to be overridden by subclasses.

Specified by:
onAfterAssert in interface IAssertLifecycle

assertTrue

public void assertTrue(boolean condition,                       String message)

assertFalse

public void assertFalse(boolean condition,                        String message)

assertFalse

public void assertFalse(boolean condition)

fail

public void fail(String message,                 Throwable realCause)

fail

public void fail(String message)

fail

public void fail()

assertEquals

public void assertEquals(Object actual,                         Object expected,                         String message)

assertEquals

public void assertEquals(Object actual,                         Object expected)

assertEquals

public void assertEquals(String actual,                         String expected,                         String message)

assertEquals

public void assertEquals(String actual,                         String expected)

assertEquals

public void assertEquals(double actual,                         double expected,                         double delta,                         String message)

assertEquals

public void assertEquals(double actual,                         double expected,                         double delta)

assertEquals

public void assertEquals(float actual,                         float expected,                         float delta,                         String message)

assertEquals

public void assertEquals(float actual,                         float expected,                         float delta)

assertEquals

public void assertEquals(long actual,                         long expected,                         String message)

assertEquals

public void assertEquals(long actual,                         long expected)

assertEquals

public void assertEquals(boolean actual,                         boolean expected,                         String message)

assertEquals

public void assertEquals(boolean actual,                         boolean expected)

assertEquals

public void assertEquals(byte actual,                         byte expected,                         String message)

assertEquals

public void assertEquals(byte actual,                         byte expected)

assertEquals

public void assertEquals(char actual,                         char expected,                         String message)

assertEquals

public void assertEquals(char actual,                         char expected)

assertEquals

public void assertEquals(short actual,                         short expected,                         String message)

assertEquals

public void assertEquals(short actual,                         short expected)

assertEquals

public void assertEquals(int actual,                         int expected,                         String message)

assertEquals

public void assertEquals(int actual,                         int expected)

assertNotNull

public void assertNotNull(Object object)

assertNotNull

public void assertNotNull(Object object,                          String message)

assertNull

public void assertNull(Object object)

assertNull

public void assertNull(Object object,                       String message)

assertSame

public void assertSame(Object actual,                       Object expected,                       String message)

assertSame

public void assertSame(Object actual,                       Object expected)

assertNotSame

public void assertNotSame(Object actual,                          Object expected,                          String message)

assertNotSame

public void assertNotSame(Object actual,                          Object expected)

assertEquals

public void assertEquals(Collection<?> actual,                         Collection<?> expected)

assertEquals

public void assertEquals(Collection<?> actual,                         Collection<?> expected,                         String message)

assertEquals

public void assertEquals(Object[] actual,                         Object[] expected,                         String message)

assertEqualsNoOrder

public void assertEqualsNoOrder(Object[] actual,                                Object[] expected,                                String message)

assertEquals

public void assertEquals(Object[] actual,                         Object[] expected)

assertEqualsNoOrder

public void assertEqualsNoOrder(Object[] actual,                                Object[] expected)

assertEquals

public void assertEquals(byte[] actual,                         byte[] expected)

assertEquals

public void assertEquals(byte[] actual,                         byte[] expected,                         String message)

assertEquals

public void assertEquals(Set<?> actual,                         Set<?> expected)

assertEquals

public void assertEquals(Set<?> actual,                         Set<?> expected,                         String message)

assertEquals

public void assertEquals(Map<?,?> actual,                         Map<?,?> expected)

assertNotEquals

public void assertNotEquals(Object actual,                            Object expected,                            String message)

assertNotEquals

public void assertNotEquals(Object actual,                            Object expected)

assertNotEquals

public void assertNotEquals(float actual,                            float expected,                            float delta,                            String message)

assertNotEquals

public void assertNotEquals(float actual,                            float expected,                            float delta)

assertNotEquals

public void assertNotEquals(double actual,                            double expected,                            double delta,                            String message)

assertNotEquals

public void assertNotEquals(double actual,                            double expected,                            double delta)


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