JUnit-addons
version 1.4

junitx.framework
Class StringAssert

java.lang.Object
  |
  +--junitx.framework.StringAssert

public class StringAssert
extends java.lang.Object

A set of assert methods specially targetted at string objects.

Version:
$Revision: 1.8 $ $Date: 2003/04/27 02:13:47 $
Author:
Vladimir R. Bossicard

Method Summary
static void assertContains(java.lang.String substring, java.lang.String actual)
          Asserts that a string contains a substring.
static void assertContains(java.lang.String message, java.lang.String substring, java.lang.String actual)
          Asserts that a string contains a substring.
static void assertEndsWith(java.lang.String substring, java.lang.String actual)
          Asserts that a string ends with a substring.
static void assertEndsWith(java.lang.String message, java.lang.String substring, java.lang.String actual)
          Asserts that a string ends with a substring.
static void assertNotContains(java.lang.String substring, java.lang.String actual)
          Asserts that a string does not contain a substring.
static void assertNotContains(java.lang.String message, java.lang.String substring, java.lang.String actual)
          Asserts that a string does not contain a substring.
static void assertNotEndsWith(java.lang.String substring, java.lang.String actual)
          Asserts that a string doesn't end with a substring.
static void assertNotEndsWith(java.lang.String message, java.lang.String substring, java.lang.String actual)
          Asserts that a string doesn't end with a substring.
static void assertNotStartsWith(java.lang.String substring, java.lang.String actual)
          Asserts that a string doesn't start with a substring.
static void assertNotStartsWith(java.lang.String message, java.lang.String substring, java.lang.String actual)
          Asserts that a string doesn't start with a substring.
static void assertStartsWith(java.lang.String substring, java.lang.String actual)
          Asserts that a string starts with a substring.
static void assertStartsWith(java.lang.String message, java.lang.String substring, java.lang.String actual)
          Asserts that a string starts with a substring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertContains

public static void assertContains(java.lang.String substring,
                                  java.lang.String actual)
Asserts that a string contains a substring. Throws an AssertionFailedError if it doesn't contain the substring.


assertContains

public static void assertContains(java.lang.String message,
                                  java.lang.String substring,
                                  java.lang.String actual)
Asserts that a string contains a substring. Throws an AssertionFailedError if it doesn't contain the substring.


assertNotContains

public static void assertNotContains(java.lang.String substring,
                                     java.lang.String actual)
Asserts that a string does not contain a substring. Throws an AssertionFailedError if it contains the substring.


assertNotContains

public static void assertNotContains(java.lang.String message,
                                     java.lang.String substring,
                                     java.lang.String actual)
Asserts that a string does not contain a substring. Throws an AssertionFailedError if it contains the substring.


assertStartsWith

public static void assertStartsWith(java.lang.String substring,
                                    java.lang.String actual)
Asserts that a string starts with a substring. Throws an AssertionFailedError if it contains the substring.


assertStartsWith

public static void assertStartsWith(java.lang.String message,
                                    java.lang.String substring,
                                    java.lang.String actual)
Asserts that a string starts with a substring. Throws an AssertionFailedError if it contains the substring.


assertNotStartsWith

public static void assertNotStartsWith(java.lang.String substring,
                                       java.lang.String actual)
Asserts that a string doesn't start with a substring. Throws an AssertionFailedError if it contains the substring.


assertNotStartsWith

public static void assertNotStartsWith(java.lang.String message,
                                       java.lang.String substring,
                                       java.lang.String actual)
Asserts that a string doesn't start with a substring. Throws an AssertionFailedError if it contains the substring.


assertEndsWith

public static void assertEndsWith(java.lang.String substring,
                                  java.lang.String actual)
Asserts that a string ends with a substring. Throws an AssertionFailedError if it contains the substring.


assertEndsWith

public static void assertEndsWith(java.lang.String message,
                                  java.lang.String substring,
                                  java.lang.String actual)
Asserts that a string ends with a substring. Throws an AssertionFailedError if it contains the substring.


assertNotEndsWith

public static void assertNotEndsWith(java.lang.String substring,
                                     java.lang.String actual)
Asserts that a string doesn't end with a substring. Throws an AssertionFailedError if it contains the substring.


assertNotEndsWith

public static void assertNotEndsWith(java.lang.String message,
                                     java.lang.String substring,
                                     java.lang.String actual)
Asserts that a string doesn't end with a substring. Throws an AssertionFailedError if it contains the substring.


JUnit-addons
version 1.4

Copyright © 2002-2003 Vladimir R. Bossicard. All Rights Reserved.