org.seasar.aptina.commons.util
クラス AssertionUtils

java.lang.Object
  上位を拡張 org.seasar.aptina.commons.util.AssertionUtils

public class AssertionUtils
extends Object

表明を扱うユーティリティです.

作成者:
koichik

メソッドの概要
static void assertEquals(int expected, int actual)
          期待する値と実際の値が等しくなければならないことを表明します.
static void assertEquals(long expected, long actual)
          期待する値と実際の値が等しくなければならないことを表明します.
static void assertNotEmpty(String name, CharSequence string)
          文字列が null でも空でもいけないことを表明します.
static void assertNotEmpty(String name, Collection<?> collection)
          コレクションが null でも空でもいけないことを表明します.
static void assertNotEmpty(String name, Object[] array)
          配列が null でも空でもいけないことを表明します.
static void assertNotNull(String name, Object param)
          パラメータが null ではいけないことを表明します.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

assertNotNull

public static void assertNotNull(String name,
                                 Object param)
                          throws AssertionError
パラメータが null ではいけないことを表明します.

パラメータ:
name - パラメータの名前
param - パラメータ
例外:
AssertionError - パラメータが null の場合

assertNotEmpty

public static void assertNotEmpty(String name,
                                  CharSequence string)
                           throws AssertionError
文字列が null でも空でもいけないことを表明します.

パラメータ:
name - 配列の名前
string - 文字列
例外:
AssertionError - 文字列が null または場合

assertNotEmpty

public static void assertNotEmpty(String name,
                                  Object[] array)
                           throws AssertionError
配列が null でも空でもいけないことを表明します.

パラメータ:
name - 配列の名前
array - 配列
例外:
AssertionError - 配列が null または空の場合

assertNotEmpty

public static void assertNotEmpty(String name,
                                  Collection<?> collection)
                           throws AssertionError
コレクションが null でも空でもいけないことを表明します.

パラメータ:
name - 配列の名前
collection - コレクション
例外:
AssertionError - 配列が null または空の場合

assertEquals

public static void assertEquals(int expected,
                                int actual)
                         throws AssertionError
期待する値と実際の値が等しくなければならないことを表明します.

パラメータ:
expected - 期待する値
actual - 実際の値
例外:
AssertionError - 期待する値が実際の値と異なった場合

assertEquals

public static void assertEquals(long expected,
                                long actual)
                         throws AssertionError
期待する値と実際の値が等しくなければならないことを表明します.

パラメータ:
expected - 期待する値
actual - 実際の値
例外:
AssertionError - 期待する値が実際の値と異なった場合


Copyright © 2009-2010 The Seasar Foundation. All Rights Reserved.