JSF Test Framework: Script Unit 1.1.2

org.jboss.test.qunit
Class Qunit

java.lang.Object
  extended by org.jboss.test.qunit.Qunit
All Implemented Interfaces:
org.junit.rules.MethodRule

public class Qunit
extends Object
implements org.junit.rules.MethodRule

This class represents qunit test environment ( html page, java script libraries ... )

Author:
asmirnov@exadel.com

Nested Class Summary
static class Qunit.Builder
          

 
Field Summary
static String DEFAULT_URL
           
 
Constructor Summary
protected Qunit()
           
 
Method Summary
 org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target)
           
static Qunit.Builder builder()
           
protected  String getHtmlContent(Object target)
          

 com.gargoylesoftware.htmlunit.html.HtmlPage getPage()
          

 Object runScript(String script)
          

Run JavaScript expression in page context and returns result

protected  void setupQunit(org.junit.runners.model.FrameworkMethod method, Object target)
           
protected  void thearDownQunit(org.junit.runners.model.FrameworkMethod method, Object target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_URL

public static final String DEFAULT_URL
See Also:
Constant Field Values
Constructor Detail

Qunit

protected Qunit()
Method Detail

apply

public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
                                               org.junit.runners.model.FrameworkMethod method,
                                               Object target)
Specified by:
apply in interface org.junit.rules.MethodRule

thearDownQunit

protected void thearDownQunit(org.junit.runners.model.FrameworkMethod method,
                              Object target)

setupQunit

protected void setupQunit(org.junit.runners.model.FrameworkMethod method,
                          Object target)
                   throws com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException,
                          IOException
Throws:
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException
IOException

getHtmlContent

protected String getHtmlContent(Object target)

Parameters:
target -
Returns:
the htmlContent

runScript

public Object runScript(String script)

Run JavaScript expression in page context and returns result

Parameters:
script -
Returns:

getPage

public com.gargoylesoftware.htmlunit.html.HtmlPage getPage()

Returns:
the page

builder

public static Qunit.Builder builder()

JSF Test Framework: Script Unit 1.1.2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.