public class LisaProp extends java.lang.Object implements IReport, java.io.Serializable
It is used when reporting properties used or missing from the system under test
If the value is a simple String type the it is encoded as a string. All other types are encoded using XStream - see http://xstream.codehaus.org
On the LISA side, in the case of a String value, you will see an EVENT_SETPROP in your test events, the short message is the name (key) and the long message is the value. The new property with the name equal to the key can be asserted against, etc. It's a first-class property, so you can use {{MyPropName}} once this is set.
In the case of a non-string type, we encode using XStream. On the LISA side, we set two properties, one with the
name of the key and another of the same name but we append '.xml' If XStream on the LISA side cannot deserialize
the object (which could be quite common if server-side classes are not available) you can at least use XPath style
assertions against the .xml property (and it's useful to be able to log it, for example). If the XStream
desrialization is succesful, the property is a first class java object - for example, an Order object with a Collection
of LineItem objects. You can make an assertion on this object by using a java script assertion similar to
return MyProp.getTotal.equals(new BigDecimal("9.99"));
Constructor and Description |
---|
LisaProp()
Exists only for serialization issues
Default constructor
|
LisaProp(java.lang.String name,
java.lang.Object obj) |
LisaProp(java.lang.String name,
java.io.Serializable obj)
Deprecated.
in favour of LisaProp(String, Object)
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getKey() |
java.lang.Object |
getVal() |
java.lang.String |
getXmlRep() |
void |
readXML(org.w3c.dom.Element e) |
void |
setKey(java.lang.String key) |
void |
setVal(java.io.Serializable val)
Deprecated.
create a new LisaProp instead
|
void |
writeXML(java.io.PrintWriter pw) |
public LisaProp()
Default constructor
public LisaProp(java.lang.String name, java.io.Serializable obj)
name
- obj
- public LisaProp(java.lang.String name, java.lang.Object obj)
public java.lang.Object getKey()
public void setKey(java.lang.String key)
key
- public java.lang.Object getVal()
public void setVal(java.io.Serializable val)
val
- public java.lang.String getXmlRep()
Copyright © 1998-2014 CA, Inc. All Rights Reserved.