FileDocCategorySizeDatePackage
MockTag.javaAPI DocExample3033Mon Jul 23 13:26:16 BST 2007org.apache.struts2.views.jsp.ui

MockTag

public class MockTag extends javax.servlet.jsp.tagext.BodyTagSupport

Fields Summary
private static final long
serialVersionUID
private static String
s
private static Integer
i
private static Double
d
private static Long
l
private static Float
f
private static Date
date
private static Calendar
cal
private static HashMap
params
private static MockTag
instance
Constructors Summary
Methods Summary
public voidaddParameter(java.lang.String key, java.lang.Object value)

        MockTag.params.put(key, value);
    
public java.util.CalendargetCal()

        return cal;
    
public java.util.DategetDate()

        return date;
    
public java.lang.DoublegetDouble()

        return d;
    
public java.lang.FloatgetFloat()

        return f;
    
public static org.apache.struts2.views.jsp.ui.MockTaggetInstance()



        
        return instance;
    
public java.lang.IntegergetInteger()

        return i;
    
public java.lang.LonggetLong()

        return l;
    
public java.util.MapgetParameters()

        return MockTag.params;
    
public java.lang.StringgetString()

        return s;
    
public voidreset()
resets all the static variables to their initial state. this must be called before each test!

        s = null;
        i = null;
        l = null;
        f = null;
        date = null;
        cal = null;
        params = new HashMap();
    
public voidsetCal(java.util.Calendar cal)

        MockTag.cal = cal;
    
public voidsetDate(java.util.Date date)

        MockTag.date = date;
    
public voidsetDouble(java.lang.Double d)

        MockTag.d = d;
    
public voidsetFloat(java.lang.Float f)

        MockTag.f = f;
    
public voidsetInteger(java.lang.Integer i)

        MockTag.i = i;
    
public voidsetLong(java.lang.Long l)

        MockTag.l = l;
    
public voidsetString(java.lang.String s)

        MockTag.s = s;