com.unitedinternet.portal.selenium.utils.logging
Class LoggingAssert

java.lang.Object
  extended by com.unitedinternet.portal.selenium.utils.logging.LoggingAssert

public final class LoggingAssert
extends java.lang.Object

Wrapped junit4 assertions to enable logging them. Only a couple junit4 assertions are wrapped here. And these always expect a message (use null if you do not care) TODO: use reflection proxy or AOP to get this working more smoothly Maybe wrap also these? fail(String message), assertArrayEquals(String message, Object[] expecteds, Object[] actuals)

Author:
Robert Zimmermann $Id: LoggingAssert.java 66 2008-02-11 22:27:05Z bobbyde $

Method Summary
static void assertEquals(java.lang.String message, java.lang.Object expected, java.lang.Object actual, LoggingSelenium selenium)
          As in Junit4 (see there for details).
static void assertFalse(java.lang.String message, boolean condition, LoggingSelenium selenium)
          As in Junit4 (see there for details).
static
<T> void
assertThat(java.lang.String message, T actual, org.hamcrest.Matcher<T> matcher, LoggingSelenium selenium)
          As in Junit4 (see there for details).
static void assertTrue(java.lang.String message, boolean condition, LoggingSelenium selenium)
          As in Junit4 (see there for details).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertTrue

public static void assertTrue(java.lang.String message,
                              boolean condition,
                              LoggingSelenium selenium)
As in Junit4 (see there for details). Additionaly an selenium object is needed to enable logging.

Parameters:
message - always needed - please provide a good description what may have been wrong
condition - condition to be checked for true
selenium - selenium object to be logged through

assertFalse

public static void assertFalse(java.lang.String message,
                               boolean condition,
                               LoggingSelenium selenium)
As in Junit4 (see there for details). Additionaly an selenium object is needed to enable logging.

Parameters:
message - always needed - please provide a good description what may have been wrong
condition - condition to be checked for false
selenium - selenium object to be logged through

assertEquals

public static void assertEquals(java.lang.String message,
                                java.lang.Object expected,
                                java.lang.Object actual,
                                LoggingSelenium selenium)
As in Junit4 (see there for details). Additionaly an selenium object is needed to enable logging.

Parameters:
message - always needed - please provide a good description what may have been wrong
expected - what is expected
actual - what is to be checked for equality
selenium - selenium object to be logged through

assertThat

public static <T> void assertThat(java.lang.String message,
                                  T actual,
                                  org.hamcrest.Matcher<T> matcher,
                                  LoggingSelenium selenium)
As in Junit4 (see there for details). Additionaly an selenium object is needed to enable logging.

Type Parameters:
T - see junit4 for details
Parameters:
message - always needed - please provide a good description what may have been wrong
actual - what is to be checked for equality
matcher - see junit4 for details on possible matcher
selenium - selenium object to be logged through


Copyright © 2009. All Rights Reserved.