Метод | Описание | |
---|---|---|
ArgumentHasElements ( ICollection argument, string name ) : void |
Checks the value of the supplied ICollection argument and throws an ArgumentException if it is
|
|
ArgumentHasLength ( ICollection argument, string name ) : void |
Checks the value of the supplied ICollection argument and throws an ArgumentNullException if it is
|
|
ArgumentHasLength ( ICollection argument, string name, string message ) : void |
Checks the value of the supplied ICollection argument and throws an ArgumentNullException if it is
|
|
ArgumentHasText ( string argument, string name ) : void |
Checks the value of the supplied string argument and throws an System.ArgumentNullException if it is
|
|
ArgumentHasText ( string argument, string name, string message ) : void |
Checks the value of the supplied string argument and throws an System.ArgumentNullException if it is
|
|
ArgumentNotNull ( object argument, string name ) : void |
Checks the value of the supplied argument and throws an System.ArgumentNullException if it is
|
|
ArgumentNotNull ( object argument, string name, string message ) : void |
Checks the value of the supplied argument and throws an System.ArgumentNullException if it is
|
|
AssertArgumentType ( object argument, string argumentName, |
Checks whether the specified argument can be cast into the requiredType.
|
|
IsTrue ( bool expression ) : void |
Assert a boolean expression, throwing
|
|
IsTrue ( bool expression, string message ) : void |
Assert a boolean expression, throwing
|
|
State ( bool expression, string message ) : void |
Assert a bool expression, throwing
|
|
Understands ( object target, string targetName, |
Checks, whether method may be invoked on target. Supports testing transparent proxies.
|
|
Understands ( object target, string targetName, |
checks, whether target supports the methods of requiredType. Supports testing transparent proxies.
|
Метод | Описание | |
---|---|---|
AssertUtils ( ) : System |
Creates a new instance of the Spring.Util.AssertUtils class. This is a utility class, and as such exposes no public constructors. |
public static ArgumentHasElements ( ICollection argument, string name ) : void | ||
argument | ICollection | The array or collection to check. |
name | string | The argument name. |
Результат | void |
public static ArgumentHasLength ( ICollection argument, string name ) : void | ||
argument | ICollection | The array or collection to check. |
name | string | The argument name. |
Результат | void |
public static ArgumentHasLength ( ICollection argument, string name, string message ) : void | ||
argument | ICollection | The array or collection to check. |
name | string | The argument name. |
message | string | An arbitrary message that will be passed to any thrown |
Результат | void |
public static ArgumentHasText ( string argument, string name ) : void | ||
argument | string | The string to check. |
name | string | The argument name. |
Результат | void |
public static ArgumentHasText ( string argument, string name, string message ) : void | ||
argument | string | The string to check. |
name | string | The argument name. |
message | string |
/// An arbitrary message that will be passed to any thrown
/// |
Результат | void |
public static ArgumentNotNull ( object argument, string name ) : void | ||
argument | object | The object to check. |
name | string | The argument name. |
Результат | void |
public static ArgumentNotNull ( object argument, string name, string message ) : void | ||
argument | object | The object to check. |
name | string | The argument name. |
message | string |
/// An arbitrary message that will be passed to any thrown
/// |
Результат | void |
public static AssertArgumentType ( object argument, string argumentName, |
||
argument | object | /// The argument to check. /// |
argumentName | string | /// The name of the argument to check. /// |
requiredType | /// The required type for the argument. /// | |
message | string |
/// An arbitrary message that will be passed to any thrown
/// |
Результат | void |
public static IsTrue ( bool expression ) : void | ||
expression | bool | a boolean expression. |
Результат | void |
public static IsTrue ( bool expression, string message ) : void | ||
expression | bool | a boolean expression. |
message | string | The exception message to use if the assertion fails. |
Результат | void |
public static State ( bool expression, string message ) : void | ||
expression | bool | a boolean expression. |
message | string | The exception message to use if the assertion fails |
Результат | void |
public static Understands ( object target, string targetName, |
||
target | object | the target instance or |
targetName | string | the name of the target to be used in error messages |
method | the method to test for | |
Результат | void |
public static Understands ( object target, string targetName, |
||
target | object | the target instance or |
targetName | string | the name of the target to be used in error messages |
requiredType | the type to test for | |
Результат | void |