org.apache.sling.junit.impl.servlet
Class HtmlRenderer

java.lang.Object
  extended by org.junit.runner.notification.RunListener
      extended by org.apache.sling.junit.impl.servlet.HtmlRenderer
All Implemented Interfaces:
Renderer

@Service
public class HtmlRenderer
extends org.junit.runner.notification.RunListener
implements Renderer

HTML renderer for JUnit servlet


Field Summary
static java.lang.String EXTENSION
           
 
Constructor Summary
HtmlRenderer()
           
 
Method Summary
 boolean appliesTo(TestSelector s)
          True if this renderer applies to supplied request
 void cleanup()
          Called once rendering is done
 java.lang.String getExtension()
          Return the extension that triggers this renderer
 org.junit.runner.notification.RunListener getRunListener()
          Provide a RunListener for JUnit tests
 void info(java.lang.String cssClass, java.lang.String str)
          Render general information
 void link(java.lang.String info, java.lang.String url, java.lang.String method)
          Render a link to specified URL using specified HTTP method
 void list(java.lang.String cssClass, java.util.Collection<java.lang.String> data)
          Render a list of things
 void setup(javax.servlet.http.HttpServletResponse response, java.lang.String pageTitle)
          Called first to setup rendering
 void testFailure(org.junit.runner.notification.Failure failure)
           
 void testFinished(org.junit.runner.Description description)
           
 void testIgnored(org.junit.runner.Description description)
           
 void testRunFinished(org.junit.runner.Result result)
           
 void testRunStarted(org.junit.runner.Description description)
           
 void testStarted(org.junit.runner.Description description)
           
 void title(int level, java.lang.String title)
          Render a title of a specified hierarchical level
 
Methods inherited from class org.junit.runner.notification.RunListener
testAssumptionFailure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
See Also:
Constant Field Values
Constructor Detail

HtmlRenderer

public HtmlRenderer()
Method Detail

appliesTo

public boolean appliesTo(TestSelector s)
Description copied from interface: Renderer
True if this renderer applies to supplied request

Specified by:
appliesTo in interface Renderer

getExtension

public java.lang.String getExtension()
Description copied from interface: Renderer
Return the extension that triggers this renderer

Specified by:
getExtension in interface Renderer

info

public void info(java.lang.String cssClass,
                 java.lang.String str)
Description copied from interface: Renderer
Render general information

Specified by:
info in interface Renderer

list

public void list(java.lang.String cssClass,
                 java.util.Collection<java.lang.String> data)
Description copied from interface: Renderer
Render a list of things

Specified by:
list in interface Renderer

title

public void title(int level,
                  java.lang.String title)
Description copied from interface: Renderer
Render a title of a specified hierarchical level

Specified by:
title in interface Renderer

link

public void link(java.lang.String info,
                 java.lang.String url,
                 java.lang.String method)
Description copied from interface: Renderer
Render a link to specified URL using specified HTTP method

Specified by:
link in interface Renderer

setup

public void setup(javax.servlet.http.HttpServletResponse response,
                  java.lang.String pageTitle)
           throws java.io.IOException,
                  java.io.UnsupportedEncodingException
Description copied from interface: Renderer
Called first to setup rendering

Specified by:
setup in interface Renderer
Throws:
java.io.IOException
java.io.UnsupportedEncodingException

cleanup

public void cleanup()
Description copied from interface: Renderer
Called once rendering is done

Specified by:
cleanup in interface Renderer

getRunListener

public org.junit.runner.notification.RunListener getRunListener()
Description copied from interface: Renderer
Provide a RunListener for JUnit tests

Specified by:
getRunListener in interface Renderer

testFailure

public void testFailure(org.junit.runner.notification.Failure failure)
                 throws java.lang.Exception
Overrides:
testFailure in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception

testFinished

public void testFinished(org.junit.runner.Description description)
                  throws java.lang.Exception
Overrides:
testFinished in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception

testIgnored

public void testIgnored(org.junit.runner.Description description)
                 throws java.lang.Exception
Overrides:
testIgnored in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception

testRunFinished

public void testRunFinished(org.junit.runner.Result result)
                     throws java.lang.Exception
Overrides:
testRunFinished in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception

testRunStarted

public void testRunStarted(org.junit.runner.Description description)
                    throws java.lang.Exception
Overrides:
testRunStarted in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception

testStarted

public void testStarted(org.junit.runner.Description description)
                 throws java.lang.Exception
Overrides:
testStarted in class org.junit.runner.notification.RunListener
Throws:
java.lang.Exception


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.