站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

AssertResult - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.test.framework.container.result
Class AssertResult

java.lang.Object
  extended byorg.jboss.portal.test.framework.container.result.Result
      extended byorg.jboss.portal.test.framework.container.result.AssertResult
All Implemented Interfaces:
java.io.Serializable

public class AssertResult
extends Result

A set of assertions as result.

See Also:
Serialized Form

Nested Class Summary
static class AssertResult.Test
           
 
Constructor Summary
AssertResult()
           
AssertResult(java.lang.Throwable t)
           
 
Method Summary
 ClientCommand createCommand()
          Return the command to execute on the client side.
 void execute(AssertResult.Test test)
          Run the test, record the error or failure if any and increment the count.
 int getCount()
          Return how many times the execute method has been successfully invoked.
 java.lang.Throwable getThrowable()
          Return the recorded throwable or null if nothing has been recorded.
 boolean isFailed()
          Return true if throwable is null.
static AssertResult run(AssertResult.Test test)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertResult

public AssertResult()

AssertResult

public AssertResult(java.lang.Throwable t)
Method Detail

run

public static AssertResult run(AssertResult.Test test)
                        throws java.lang.IllegalArgumentException,
                               java.lang.IllegalStateException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

execute

public void execute(AssertResult.Test test)
             throws java.lang.IllegalArgumentException,
                    java.lang.IllegalStateException
Run the test, record the error or failure if any and increment the count.

Parameters:
test - the test to execute
Throws:
java.lang.IllegalArgumentException - if test is null
java.lang.IllegalStateException - if the test is already failed

getCount

public int getCount()
Return how many times the execute method has been successfully invoked.


getThrowable

public java.lang.Throwable getThrowable()
Return the recorded throwable or null if nothing has been recorded.


isFailed

public boolean isFailed()
Return true if throwable is null.


createCommand

public ClientCommand createCommand()
Description copied from class: Result
Return the command to execute on the client side.

Specified by:
createCommand in class Result