com.mycila.testing.plugins.jetty
Class WebappHelper

java.lang.Object
  extended by com.mycila.testing.plugins.jetty.WebappHelper

public class WebappHelper
extends Object

Some helper methods to deal with webapp context.


Constructor Summary
WebappHelper()
           
 
Method Summary
static String getWebappUrl(Method method)
          Returns the web application URL from a the given test method which should be annotated with JettyRunWar (or its Method.getDeclaringClass() at least) and doesn't end with slash '/'.
static String getWebappUrl(Object instance)
          Returns the web application URL from a the given test class instance which must be annotated with JettyRunWar and doesn't end with slash '/'.
static String getWebappUrl(Object instance, String methodName)
          Returns the web application URL from a the given test method which should be annotated with JettyRunWar (or its Method.getDeclaringClass() at least) and doesn't end with slash '/'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebappHelper

public WebappHelper()
Method Detail

getWebappUrl

public static String getWebappUrl(Object instance)
Returns the web application URL from a the given test class instance which must be annotated with JettyRunWar and doesn't end with slash '/'.

Parameters:
instance - the test object.
Returns:
the web application URL.

getWebappUrl

public static String getWebappUrl(Object instance,
                                  String methodName)
Returns the web application URL from a the given test method which should be annotated with JettyRunWar (or its Method.getDeclaringClass() at least) and doesn't end with slash '/'.

Parameters:
instance - the test object.
methodName - the test method name.
Returns:
the web application URL.

getWebappUrl

public static String getWebappUrl(Method method)
Returns the web application URL from a the given test method which should be annotated with JettyRunWar (or its Method.getDeclaringClass() at least) and doesn't end with slash '/'.

Parameters:
method - the test method.
Returns:
the web application URL.


Copyright © 2010-2011 Mycila. All Rights Reserved.