File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 249 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 216 |
}
public void raiseRankOf(IReferenceInfo info) {
if (this.getDestId().equals(info.getSourceId())
&& (this.getDestType().equals(info.getSourceType()) || TypedObject.UNKNOWN_TYPE
.equals(info.getDestType()))) {
if (this.getRank() >= info.getRank()) {
info.setRank(this.getRank() + 1);
}
}
}
public void resolve(IDataSet dataSet, String groupId, String testId) {
if (ParserConstants.UNKNOWN.equals(groupId)
&& ParserConstants.UNKNOWN.equals(testId)) {
doResolution(dataSet);
} else if (!ParserConstants.UNKNOWN.equals(testId)) {
IDataSet groupSet = dataSet.get(groupId);
IDataSet testDataSet = null;
if (groupSet != null) {
testDataSet = groupSet.get(testId);
}
doResolution(testDataSet);
} else {
throw new DDTTestDataException(
"Do not process group data without testId");
}
}
/**
* @param dataSet to resolve reference to
*/
private void doResolution(IDataSet dataSet) {
TypedObject dest = dataSet.findObject(this.getDestId(),
this.getDestType());
TypedObject source = dataSet.getObject(this.getSourceId(),
this.getSourceType());
if (source == null && dataSet instanceof TestDataSet) {
source = ((TestDataSet) dataSet).getAssert(this.getSourceId(),
this.getSourceType());
}
if (dest != null && source != null) { |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 74 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 107 |
IAction rootAction = this.getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue)
|| HintTypes.MAP.equals(hintValue)
|| HintTypes.ATTRLIST.equals(hintValue)
|| HintTypes.FIELDS.equals(hintValue)
|| HintTypes.CONSTRUCTOR.equals(hintValue)
|| HintTypes.CALL.equals(hintValue)
|| HintTypes.BEAN.equals(hintValue)
|| HintTypes.ARRAY.equals(hintValue)
|| HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new DDTException("Unknown hint (" + hintValue
+ ")- stop processing.");
}
} else {
if (hasReferenceInfo()) {
TypedObject destObject;
if (this.attrMap.get(ParserConstants.XML_ATTR_TYPE) == null) {
destObject = new TypedObject(getAttribute("refid"));
} else {
destObject = new TypedObject(getAttribute("refid"),
getType());
}
IReferenceInfo refInfo = new ObjectReferenceInfo(this
.getObject(), destObject);
add(refInfo);
} |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 81 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 83 |
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.MAP.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ATTRLIST.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.FIELDS.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.CONSTRUCTOR.equals(hintValue)
|| HintTypes.CALL.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new DDTException("Unknown hint (" + hintValue
+ ")- stop processing.");
}
} else { |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 259 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 290 |
}
public void resolve(IDataSet dataSet, String groupId, String testId) {
if (ParserConstants.UNKNOWN.equals(groupId)
&& ParserConstants.UNKNOWN.equals(testId)) {
doResolution(dataSet);
} else if (!ParserConstants.UNKNOWN.equals(testId)) {
IDataSet groupSet = dataSet.get(groupId);
IDataSet testDataSet = null;
if (groupSet != null) {
testDataSet = groupSet.get(testId);
}
doResolution(testDataSet);
} else {
throw new DDTTestDataException(
"Do not process group data without testId");
}
}
/**
* @param dataSet to resolve reference to
*/
private void doResolution(IDataSet dataSet) {
TypedObject dest = dataSet.findObject(this.getDestId(), this
.getDestType());
TypedObject source = dataSet.getObject(this.getSourceId(), this
.getSourceType());
if (source == null && dataSet instanceof TestDataSet) {
source = ((TestDataSet) dataSet).getAssert(this.getSourceId(),
this.getSourceType());
}
if (dest != null && source != null) { |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ContentHandler.java | 120 |
junitx/ddtunit/data/processing/parser/ContentHandler.java | 147 |
this.eventConsumer.processEndElement(qName, this.levelCount);
} catch (Exception ex) {
StringBuffer sb = new StringBuffer(ex.getClass().getName());
sb.append(ex.getMessage());
sb.append(LF).append("Resource \'").append(this.resourceName)
.append("\' line/column ").append(locator.getLineNumber())
.append("/").append(locator.getColumnNumber());
DDTException ddtEx = new DDTException(sb.toString(), ex);
ddtEx.setStackTrace(ex.getStackTrace());
log.warn(sb.toString(), ddtEx);
throw ddtEx;
} finally { |
File | Line |
---|
junitx/framework/ArrayAssert.java | 234 |
junitx/framework/ArrayAssert.java | 331 |
byte[] actual) {
if (Arrays.equals(expected, actual)) {
return;
}
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.assertNotNull(formatted + "expected array: <not null> but was <null>", expected);
Assert.assertNotNull(formatted + "expected array: <null> but was <not null>", actual);
Assert.assertEquals(formatted + "[array length] ", expected.length, actual.length);
for (int i = 0; i < actual.length; i++) {
Assert.assertEquals(formatted + "[position " + i + "]", expected[i], actual[i]);
}
}
/**
* Asserts that two arrays are equal. Two arrays are considered equal if:
* <ul>
* <li>their respective lengths are the same</i>
* <li>all corresponding pairs of elements are equal
* <li>both array references are <code>null</code>
* </ul>
*
* @param expected a byte array of expected values
* @param actual a byte array of actual values
*/
public static void assertEquals(byte[] expected, |
File | Line |
---|
junitx/framework/ArrayAssert.java | 150 |
junitx/framework/ArrayAssert.java | 184 |
float delta) {
if (Arrays.equals(expected, actual)) {
return;
}
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.assertNotNull(formatted + "expected array: <not null> but was <null>", expected);
Assert.assertNotNull(formatted + "expected array: <null> but was <not null>", actual);
Assert.assertEquals(formatted + "[array length] ", expected.length, actual.length);
for (int i = 0; i < actual.length; i++) {
Assert.assertEquals(formatted + "[position " + i + "]", expected[i], actual[i], delta);
}
}
/**
* Asserts that two arrays are equal. Two arrays are considered equal if:
* <ul>
* <li>their respective lengths are the same</i>
* <li>all corresponding pairs of elements are equal (within the delta range)
* <li>both array references are <code>null</code>
* </ul>
*
* @param expected a float array of expected values
* @param actual a float array of actual values
* @param delta tolerated delta
*/
public static void assertEquals(float[] expected, |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 116 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 117 |
new HashMap<String, String>());
action.inject();
action.setValue(new Vector());
this.insert(action);
action.process();
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
this.injectedObject = new TypedObject(id, type);
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.ATTRLIST.equals(successor.getHint())) { |
File | Line |
---|
junitx/framework/ArrayAssert.java | 150 |
junitx/framework/ArrayAssert.java | 380 |
long[] actual) {
if (Arrays.equals(expected, actual)) {
return;
}
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.assertNotNull(formatted + "expected array: <not null> but was <null>", expected);
Assert.assertNotNull(formatted + "expected array: <null> but was <not null>", actual);
Assert.assertEquals(formatted + "[array length] ", expected.length, actual.length);
for (int i = 0; i < actual.length; i++) {
Assert.assertEquals(formatted + "[position " + i + "]", expected[i], actual[i]); |
File | Line |
---|
junitx/ddtunit/data/processing/DateCreatorAction.java | 121 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 101 |
} else {
throw new DDTException("Unknown hint (" + hintValue
+ ")- stop processing.");
}
} else {
// process obj element - no rootAction exiats
if (hasReferenceInfo()) {
TypedObject destObject;
if (this.attrMap.get(ParserConstants.XML_ATTR_TYPE) == null) {
destObject = new TypedObject(getAttribute("refid"));
} else {
destObject = new TypedObject(getAttribute("refid"),
getType());
}
IReferenceInfo refInfo = new ObjectReferenceInfo(this
.getObject(), destObject);
add(refInfo);
}
}
this.pop();
return this;
}
/**
* If no content on tag is provided just instanciate object by default
* constructor.
*/
public void processNoSuccessor() { |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 75 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 84 |
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue)
|| HintTypes.MAP.equals(hintValue)
|| HintTypes.ATTRLIST.equals(hintValue)
|| HintTypes.FIELDS.equals(hintValue)
|| HintTypes.CONSTRUCTOR.equals(hintValue)
|| HintTypes.CALL.equals(hintValue)
|| HintTypes.BEAN.equals(hintValue)
|| HintTypes.ARRAY.equals(hintValue)
|| HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 430 |
junitx/ddtunit/util/ClassAnalyser.java | 485 |
private static boolean filterByPrimitiveParam(Object method, Class[] args,
int pos) {
boolean valid = false;
Class arg;
Class argOnPos;
// exit criterion for recursion
if (pos >= args.length) {
valid = true;
} else {
arg = args[pos];
if (java.lang.reflect.Constructor.class.isInstance(method)) {
argOnPos = ((Constructor) method).getParameterTypes()[pos];
} else {
argOnPos = ((Method) method).getParameterTypes()[pos];
}
// check if primitiv type of argOnPos exists
if (hasPrimitive(arg) && argOnPos.equals(getPrimitiveClass(arg))) { |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 135 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 115 |
this.producer.setProperty(JAXP_SCHEMA_SOURCE, ParserImpl.XSD_URL);
} catch (SAXNotRecognizedException e) {
throw DDTException
.create(
new StringBuffer(
"XML ParserImpl does not support schema validation as of JAXP 1.2"),
e);
} catch (ParserConfigurationException e) {
throw DDTException.create(new StringBuffer(
"Error configuring parser."), e);
} catch (SAXException e) {
throw DDTException.create(new StringBuffer(
"Error configuring parser."), e);
}
this.producer.setErrorHandler(new ErrorHandler());
this.producer.setEntityResolver(new EntityResolver());
log.debug("DDTParser - constructor END");
}
public void validate(String resourceName) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 157 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 195 |
Class fieldClazz = field.getValue().getClass();
Class[] args = new Class[1];
args[0] = fieldClazz;
Method setMethod = (Method) ClassAnalyser.findMethodByParams(
this.getType(), setter.toString(), args);
setMethod.setAccessible(true);
Object[] objs = new Object[1];
objs[0] = field.getValue();
setMethod.invoke(this.getValue(), objs);
} catch (Exception ex) { |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 511 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 339 |
}
}
/**
* If this object is referencing to the provided info object then raise
* rank of referenced object info.<br/> A reference from an
* ObjectAction to another Action is detected if destination info is
* equal to the source info of provided info.
*
* @param info to check reference on and raise rank respectivly
*/
public void raiseRankOf(IReferenceInfo info) {
if (this.getDestId().equals(info.getSourceId())
&& (this.getDestType().equals(info.getSourceType()) || TypedObject.UNKNOWN_TYPE
.equals(info.getDestType()))) {
if (this.getRank() >= info.getRank()) {
info.setRank(this.getRank() + 1);
}
}
}
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 88 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 101 |
} else {
throw new DDTException("Unknown hint (" + hintValue
+ ")- stop processing.");
}
} else {
// process obj element - no rootAction exiats
if (hasReferenceInfo()) {
TypedObject destObject;
if (this.attrMap.get(ParserConstants.XML_ATTR_TYPE) == null) {
destObject = new TypedObject(getAttribute("refid"));
} else {
destObject = new TypedObject(getAttribute("refid"),
getType());
}
IReferenceInfo refInfo = new ObjectReferenceInfo(this
.getObject(), destObject);
add(refInfo);
} |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 512 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 249 |
}
public void raiseRankOf(IReferenceInfo info) {
if (this.getDestId().equals(info.getSourceId())
&& (this.getDestType().equals(info.getSourceType()) || TypedObject.UNKNOWN_TYPE
.equals(info.getDestType()))) {
if (this.getRank() >= info.getRank()) {
info.setRank(this.getRank() + 1);
}
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 465 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 312 |
private void doResolution(IDataSet dataSet) {
TypedObject dest = dataSet.findObject(this.getDestId(), this
.getDestType());
TypedObject source = dataSet.getObject(this.getSourceId(), this
.getSourceType());
if (source == null && dataSet instanceof TestDataSet) {
source = ((TestDataSet) dataSet).getAssert(this.getSourceId(),
this.getSourceType());
}
if (dest != null && source != null) { |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 96 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 177 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
// check if type is based on java.util.Collection
try {
if (type == null && ParserConstants.XML_ELEM_ITEM.equals(id)) {
type = TypedObject.UNKNOWN_TYPE;
} else if (HintTypes.ARRAY.equals(this.getHint())) {
// do nothing
} else { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 220 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 260 |
}
} else {
// ARRAY successor
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap);
this.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List) attribListAction.getValue()).add(successor.getObject());
} catch (Exception ex) {
throw new DDTException("Error on action processing", ex);
}
}
this.successorProcessed = true;
} |
File | Line |
---|
junitx/framework/ArrayAssert.java | 89 |
junitx/framework/ArrayAssert.java | 184 |
double delta) {
if (Arrays.equals(expected, actual)) {
return;
}
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.assertNotNull(formatted + "expected array: <not null> but was <null>", expected);
Assert.assertNotNull(formatted + "expected array: <null> but was <not null>", actual);
Assert.assertEquals(formatted + "[array length] ", expected.length, actual.length);
for (int i = 0; i < actual.length; i++) { |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 156 |
junitx/ddtunit/data/processing/Engine.java | 167 |
} else if (ParserConstants.XML_ELEM_ASSERT.equals(qName)
&& level == LEVEL_TEST_OBJ) {
this.actionStack = new ActionStack();
IAction action = pushAction(qName, attrMap);
String type = (String) attrMap
.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) attrMap.get(ParserConstants.XML_ATTR_ID);
String actionAttr = (String) attrMap
.get(ParserConstants.XML_ATTR_ACTION);
action.setObject(new ObjectAsserter(id, type, actionAttr)); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 121 |
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 109 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
this.injectedObject = new TypedObject(id, type);
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 110 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 221 |
} else {
// ARRAY successor
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap);
this.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List) attribListAction.getValue()).add(successor.getObject());
} catch (Exception ex) {
throw new DDTException("Error on action processing", ex);
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 330 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 167 |
} catch (IOException e) {
log.error("Error on behalf of xml test resource.", e);
throw DDTException.create(new StringBuffer(
"Error on behalf of xml test resource."), e);
} catch (SAXException e) {
StringBuffer sb = new StringBuffer(
"Error during parsing of xml testresource");
if (SAXParseException.class.isInstance(e)) {
sb.append(LF).append("Resource \'").append(resourceName) |
File | Line |
---|
junitx/framework/ArrayAssert.java | 87 |
junitx/framework/ArrayAssert.java | 524 |
public static void assertEquivalenceArrays(String message,
Object[] expected,
Object[] actual) {
if (Arrays.equals(expected, actual)) {
return;
}
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.assertNotNull(formatted + "expected array: <not null> but was <null>", expected);
Assert.assertNotNull(formatted + "expected array: <null> but was <not null>", actual); |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 186 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 219 |
} else if (HintTypes.INTERNAL_MAPENTRY.equals(this.getHint())) {
try {
PrivilegedAccessor.setFieldValue(this.getValue(), successor
.getId(), successor.getObject());
} catch (Exception ex) {
throw new DDTTestDataException("Error filling map entry "
+ this.getId(), ex);
}
} else if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 310 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 107 |
this.producer.setFeature(XML_NAMESPACE_URI, true);
this.producer.setFeature(XML_VALIDATE_URI, true);
this.producer.setFeature(XML_XERCES_VALIDATE_URI, true);
this.producer.setFeature(XML_XERCES_SCHEMA_FULL_CHECK_URI, true);
this.producer.setProperty(
XML_XERCES_NONAMESPACE_SCHEMA_LOCATION_URI, ParserImpl.XSD_URL);
this.producer.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
this.producer.setProperty(JAXP_SCHEMA_SOURCE, ParserImpl.XSD_URL); |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 471 |
junitx/ddtunit/data/processing/ActionBase.java | 497 |
source = ((TestDataSet) testDataSet).getAssert(this
.getSourceId(), this.getSourceType());
}
if (dest != null && source != null) {
source.setValue(dest.getValue());
source.setType(dest.getType());
} else {
throw new DDTTestDataException(
"Error on processing references on testdata.");
}
} else {
throw new DDTTestDataException( |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 122 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 118 |
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
if (HintTypes.CONTENT.equals(successor.getHint())) {
String content = successor.getValue().toString();
if (!ContentCreatorAction.CONTENT_NULL.equals(content)) {
throw new DDTException("Only \"!NULL!\" supported in Map type"); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 169 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 204 |
} catch (Exception ex) {
StringBuffer sb = new StringBuffer("Error executing setter ")
.append(this.getType())
.append(".")
.append(setter)
.append("(...). ")
.append(
"Check if hint and setter are correct (Do not provide set-prefix!).");
throw new DDTException(sb.toString(), ex);
}
} else if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 200 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 177 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
// check if type is based on java.util.Collection
try {
if (type == null && ParserConstants.XML_ELEM_ITEM.equals(id)) {
type = TypedObject.UNKNOWN_TYPE;
} else if (HintTypes.ARRAY.equals(this.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 339 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 175 |
sb.append(LF).append("Resource \'").append(resourceName)
.append("\' line/column ").append(
((SAXParseException) e).getLineNumber()).append("/")
.append(((SAXParseException) e).getColumnNumber());
}
log.error(sb.toString(), e);
throw DDTException.create(sb, e);
} finally { |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 122 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 141 |
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.CONTENT.equals(successor.getHint())) {
String content = successor.getValue().toString();
if (!ContentCreatorAction.CONTENT_NULL.equals(content)) { |
File | Line |
---|
junitx/ddtunit/ExceptionHandler.java | 233 |
junitx/ddtunit/ExceptionHandler.java | 259 |
sb.append("E-(").append(testFailure.getMethodTest()).append(") ")
.append(testFailure.exceptionMessage());
if (iter.hasNext()) {
sb.append(LF);
}
if (testError == null) {
testError = testFailure.thrownException();
}
}
return testError;
} |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 235 |
junitx/ddtunit/data/ObjectAsserter.java | 243 |
} else if (ASSERT_ACTION_ISNOTLT.equals(this.action
.toUpperCase())) {
if (((Comparable) this.getActualObject()).compareTo(this
.getValue()) >= 0) {
Assert.fail("Expected action: " + this.getAction()
+ ". Got: " + this.getActualObject() + " > " |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 201 |
junitx/ddtunit/DDTTestCase.java | 232 |
protected Object getObject(String objectId, String objectType) {
Object obj = null;
TypedObject typedObject;
if (!this.classDataSet.containsKey(this.getName())) {
throw new DDTException("No objects defined <" + objectId
+ "> in method scope");
}
typedObject = this.classDataSet.getObject(this.getName(), this
.getTestName(), objectId, objectType); |
File | Line |
---|
junitx/framework/ArrayAssert.java | 476 |
junitx/framework/ArrayAssert.java | 526 |
Object[] actual) {
if (Arrays.equals(expected, actual)) {
return;
}
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.assertNotNull(formatted + "expected array: <not null> but was <null>", expected);
Assert.assertNotNull(formatted + "expected array: <null> but was <not null>", actual); |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 92 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 128 |
public void processNoSuccessor() {
// process direct object call providing no parameters (empty tag)
if (hasReferenceInfo()) {
TypedObject destObject;
if (this.attrMap.get(ParserConstants.XML_ATTR_TYPE) == null) {
destObject = new TypedObject(getAttribute("refid"));
} else {
destObject = new TypedObject(getAttribute("refid"), getType());
}
IReferenceInfo refInfo; |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 132 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 184 |
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.ATTRLIST.equals(successor.getHint())) {
List fields = (List) successor.getObject().getValue();
TypedObject field = null; |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 79 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 95 |
|| HintTypes.CALL.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 120 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 163 |
"Specify !NULL! or date. No empty date tag allowed.");
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
this.injectedObject = new TypedObject(id, type);
return this;
} |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 77 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 82 |
IAction rootAction = getPrevious();
if (!this.successorProcessed) {
processNoSuccessor();
}
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ARRAY.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 187 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 175 |
iSource.getSystemId()).append("\' line/column ")
.append(((SAXParseException) e).getLineNumber())
.append("/").append(
((SAXParseException) e).getColumnNumber());
}
log.error(sb.toString(), e);
throw DDTException.create(sb, e); |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 109 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 164 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
this.injectedObject = new TypedObject(id, type);
return this;
} |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 528 |
junitx/ddtunit/util/ClassAnalyser.java | 661 |
try {
verifyClazz = Class.forName(name
.substring(2, name.length() - 1));
} catch (ClassNotFoundException ex) {
throw new ClassAnalyserException(
"Could not construct base class from array");
}
}
if (verifyClazz.equals(java.lang.Integer.class) |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 181 |
junitx/ddtunit/data/processing/parser/ParserImpl.java | 332 |
throw DDTException.create(new StringBuffer(
"Error on behalf of xml test resource."), e);
} catch (SAXException e) {
StringBuffer sb = new StringBuffer(
"Error during parsing of xml testresource");
if (SAXParseException.class.isInstance(e)) {
sb.append(LF).append("Resource \'").append( |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 152 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 192 |
setter.replace(0, setter.length(), "set");
setter.append(field.getId().substring(0, 1).toUpperCase())
.append(field.getId().substring(1));
Class fieldClazz = field.getValue().getClass(); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 142 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 193 |
try {
this.getType();
// if TypedObject is not instanciated and it is no call
// operation
// create object by default constructor
if (this.getValue() == null){
// && !HintTypes.CALL.equals(this.getHint())) {
this.createObject();
}
for (int count = 0; count < fields.size(); count++) {
field = (TypedObject) fields.get(count); |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 124 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 195 |
if (!found) {
throw new DDTException("Container class '" + type
+ "' does not implement java.util.Collection.");
}
}
} catch (Exception ex) {
throw new DDTException("Container class '" + type
+ "' does not implement java.util.Collection.", ex);
}
this.injectedObject = new TypedObject(id, type);
return this;
} |
File | Line |
---|
junitx/ddtunit/DDTTestResult.java | 235 |
junitx/ddtunit/DDTTestResult.java | 263 |
.add(new DDTTestFailure(test, testName, assertError));
for (Iterator e = cloneListeners().listIterator(); e.hasNext();) {
TestListener listener = (TestListener) e.next();
if (DDTTestListener.class.isInstance(listener)) {
((DDTTestListener) listener).addMethodTestFailure(test, |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 177 |
junitx/ddtunit/data/processing/parser/ParserImpl.java | 241 |
iSource = createInputSource(xmlObjectDef, false);
this.producer.parse(iSource);
} catch (IOException e) {
log.error("Error on behalf of xml test resource.", e);
throw DDTTestDataException.create(new StringBuffer(
"Error on behalf of xml test resource."), e);
} catch (SAXException e) {
StringBuffer sb = new StringBuffer( |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 121 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 137 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
this.injectedObject = new TypedObject(id, type); |
File | Line |
---|
junitx/ddtunit/DDTTestResult.java | 237 |
junitx/ddtunit/DDTTestResult.java | 287 |
for (Iterator e = cloneListeners().listIterator(); e.hasNext();) {
TestListener listener = (TestListener) e.next();
if (DDTTestListener.class.isInstance(listener)) {
((DDTTestListener) listener).startMethodTest(test, methodName); |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 74 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 92 |
} else if (HintTypes.FIELDS.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.CONSTRUCTOR.equals(hintValue)
|| HintTypes.CALL.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 78 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 103 |
log.debug("process DateCreator - START");
if (!this.successorProcessed) {
processNoSuccessor();
}
IAction rootAction = this.getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 76 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 79 |
log.debug("process SubelementCreator - START");
IAction rootAction = this.getPrevious();
if (!this.successorProcessed) {
processNoSuccessor();
}
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 254 |
junitx/ddtunit/data/ObjectAsserter.java | 263 |
if (((IRange) this.getValue()).isInRange((Comparable) this
.getActualObject())) {
Assert.fail("Expected action: " + this.getAction()
+ ". Got: " + this.getActualObject() + " in " |
File | Line |
---|
junitx/ddtunit/DDTRunMonitor.java | 160 |
junitx/ddtunit/DDTRunMonitor.java | 175 |
public void addFailure(Test test, AssertionFailedError t) {
String method = "";
if (TestCase.class.isInstance(test)) {
method = ((TestCase) test).getName();
}
log.info("[" + test.getClass() + "] Add Faiure method " + method, t); |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 125 |
junitx/ddtunit/data/db/DbDataRestorer.java | 239 |
} catch (SQLException ex) {
throw new DDTTestDataException("Could not access db test data", ex);
} finally {
if (connect != null) {
try {
connect.close();
} catch (SQLException ex) {
// ignore exception
}
}
}
return sb; |
File | Line |
---|
junitx/ddtunit/DDTRunMonitor.java | 93 |
junitx/ddtunit/DDTRunMonitor.java | 175 |
public void addError(Test test, Throwable t) {
String method = "";
if (TestCase.class.isInstance(test)) {
method = ((TestCase) test).getName();
}
log.info("[" + test.getClass() + "] method " + method + " error:", t); |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 486 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 296 |
} else if (!ParserConstants.UNKNOWN.equals(testId)) {
IDataSet groupSet = dataSet.get(groupId);
IDataSet testDataSet = null;
if (groupSet != null) {
testDataSet = groupSet.get(testId);
} |
File | Line |
---|
junitx/ddtunit/DDTTestResult.java | 86 |
junitx/ddtunit/DDTTestResult.java | 118 |
if (DDTConfiguration.getInstance().isActiveRunMonitor()
&& !this.cloneListeners().contains(DDTRunMonitor.getInstance())) {
this.addListener(DDTRunMonitor.getInstance());
}
}
/**
* DOCUMENT ME!
*
* @param result
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public TestResult copyContent(TestResult result) { |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 150 |
junitx/ddtunit/util/ClassAnalyser.java | 321 |
log.info(ctor[i].toString());
}
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Find a Constructor/Method of class className by using the argument list
* args and try to vary arguments which could be of primitive type. <br/>
* The args list only contains classes.
*
* @param className
* @param methodName
* @param args
* @return Method/Constructor object
*/
public static Object findMethodByParams(String className, |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 177 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 164 |
}
/*
* (non-Javadoc)
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
// check if type is based on java.util.Collection
try { |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 121 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 163 |
this.createObject();
}
/*
* (non-Javadoc)
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 219 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 192 |
+ this.getId(), ex);
}
} else {
// ARRAY successor
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap);
this.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List<TypedObject>) attribListAction.getValue()).add(successor |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 120 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 163 |
this.createObject();
}
/*
* (non-Javadoc)
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 200 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 164 |
}
/*
* (non-Javadoc)
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID);
// check if type is based on java.util.Collection
try { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 198 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 164 |
action.process();
}
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 71 |
junitx/ddtunit/data/db/DbDataRestorer.java | 157 |
Connection connect = createConnection();
try {
String selectData = "select clusterid, groupid, testid, ogroup"
+ ", otype, id, class_type, action, xml from TESTDATA_VIEW "
+ "where clusterid=? ";
PreparedStatement dbData = connect.prepareStatement(selectData);
dbData.setString(1, clusterId);
ResultSet resultSet = dbData.executeQuery(); |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 122 |
junitx/ddtunit/util/ClassAnalyser.java | 253 |
log.debug(ctor[i].toString());
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Put all method names of the class qualifiedClassName into a String array
* and return it.
*
* @param qualifiedClassName Description of the Parameter
*
* @return array of all method names of the class to analyse
*
* @throws RuntimeException ClassAnalyserException if an error occures
*/
public static String[] getAllMethods(String qualifiedClassName) { |
File | Line |
---|
junitx/ddtunit/data/processing/DateCreatorAction.java | 163 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 163 |
this.createObject();
}
/*
* (non-Javadoc)
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 144 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 135 |
String linkType = successor.getAttribute(ParserConstants.XML_ATTR_VALUETYPE);
if (linkType == null) {
destObject = new TypedObject(successor.getAttribute("refid"));
} else {
destObject = new TypedObject(successor.getAttribute("refid"),
linkType);
}
IReferenceInfo refInfo; |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 82 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 80 |
IAction rootAction = this.getPrevious();
if (!this.successorProcessed) {
processNoSuccessor();
}
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 193 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 260 |
}
} else {
// ARRAY successor
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap);
this.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List) attribListAction.getValue()).add(successor.getObject()); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 84 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 105 |
} else if (HintTypes.COLLECTION.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.MAP.equals(hintValue)) {
rootAction.processSuccessor(this);
} else { |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 122 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 177 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 97 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 89 |
if (HintTypes.COLLECTION.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ATTRLIST.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 95 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 93 |
} else if (HintTypes.ATTRLIST.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.FIELDS.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 121 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 177 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 93 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 93 |
} else if (HintTypes.ATTRLIST.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.FIELDS.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 96 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 121 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 79 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 93 |
} else if (HintTypes.ATTRLIST.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.FIELDS.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 200 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 137 |
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#inject()
*/
public IAction inject() {
String type = (String) this.attrMap.get(ParserConstants.XML_ATTR_TYPE);
String id = (String) this.attrMap.get(ParserConstants.XML_ATTR_ID); |
File | Line |
---|
junitx/ddtunit/data/TypedObjectMap.java | 80 |
junitx/ddtunit/data/TypedObjectMap.java | 93 |
public TypedObject get(String id) {
TypedObject obj = null;
if (this.objectMap.containsKey(id)) {
Object value = objectMap.get(id);
if (MultiTypeMap.class.isInstance(value)) { |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 119 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 139 |
this.pop();
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 78 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 77 |
log.debug("process MapCreator Action - START");
if (!this.successorProcessed) {
processNoSuccessor();
}
IAction rootAction = getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.CONSTRUCTOR.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 133 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 184 |
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.ATTRLIST.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 110 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 194 |
} else {
// ARRAY successor
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap);
this.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List<TypedObject>) attribListAction.getValue()).add(successor |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 89 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 97 |
} else if (HintTypes.FIELDS.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new UnsupportedOperationException(
"CollectionCreatorAction does not support hint '"
+ hintValue + "'");
}
} else {
rootAction = this;
}
// if rootAction is null simply return action -> base object is a
// collection
pop(); |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 87 |
junitx/ddtunit/data/db/DbDataRestorer.java | 175 |
String oGroup = resultSet.getString("ogroup");
String id = resultSet.getString("id");
String type = resultSet.getString("class_type");
String action = resultSet.getString("action");
String xml = resultSet.getString("xml"); |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 84 |
junitx/ddtunit/data/db/DbDataRestorer.java | 171 |
while (resultSet.next()) {
String groupId = resultSet.getString("groupid");
String testId = resultSet.getString("testid");
String oType = resultSet.getString("otype");
String oGroup = resultSet.getString("ogroup"); |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 182 |
junitx/ddtunit/data/ObjectAsserter.java | 194 |
} else if (ASSERT_ACTION_ISFALSE.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
if (Boolean.class.isInstance(getActualObject())) {
isSameType();
Assert.assertFalse("Object should be false on assert (" |
File | Line |
---|
junitx/ddtunit/optional/junit4/DDTUnit4ClassRunner.java | 121 |
junitx/ddtunit/optional/junit4/DDTUnit4ClassRunner.java | 134 |
private void setUp(TestCase newInstance) throws IllegalArgumentException,
IllegalAccessException, InvocationTargetException {
Method[] methods = clazz.getMethods();
for (Method method : methods) {
// System.out.println("su " + method.getName() );
if ((method.isAnnotationPresent(Before.class) && !method |
File | Line |
---|
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 144 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 148 |
} else if (HintTypes.INTERNAL_MAPENTRY.equals(this.getPrevious().getHint())){
// if a map type is processed the subelement must be specified as ARGLIST
// the reference is processed inside of rootAction
this.attrMap.put(ParserConstants.XML_ATTR_HINT, HintTypes.ATTRLIST.toString());
} else { |
File | Line |
---|
junitx/ddtunit/data/processing/ReferenceProcessor.java | 88 |
junitx/ddtunit/data/processing/ReferenceProcessor.java | 105 |
for (int countB = countA + 1; countB < this.refList.size(); countB++) {
IReferenceInfo infoB = (IReferenceInfo) this.refList
.get(countB); |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 122 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 150 |
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 81 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 89 |
if (HintTypes.COLLECTION.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ATTRLIST.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 215 |
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 128 |
}
} catch (Exception ex) {
throw new DDTException("Container class '" + type
+ "' does not implement java.util.Collection.", ex);
}
this.injectedObject = new TypedObject(id, type);
return this;
} |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 94 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 111 |
"MapCreatorAction does not support hint '" + hintValue + "'");
}
} else {
rootAction = this;
}
pop();
return rootAction;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START"); |
File | Line |
---|
junitx/framework/AssertionFailedError.java | 136 |
junitx/framework/AssertionFailedError.java | 150 |
public void printStackTrace(PrintWriter s) {
super.printStackTrace(s);
if (this.cause != null) {
s.print("Caused by: ");
this.cause.printStackTrace(s);
}
} |
File | Line |
---|
junitx/ddtunit/optional/junit4/DDTUnit4ClassRunner.java | 98 |
junitx/ddtunit/optional/junit4/DDTUnit4ClassRunner.java | 105 |
for (Enumeration<TestFailure> en = result.failures(); en
.hasMoreElements();) {
TestFailure failure = en.nextElement();
runNotifier.fireTestFailure(new Failure(testDescription,
failure.thrownException()));
} |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 324 |
junitx/ddtunit/data/processing/Engine.java | 342 |
&& level == LEVEL_CLUSTER_GLOBAL_OBJ) {
IAction action = null;
while (!this.actionStack.isEmpty()) {
action = this.actionStack.process();
}
// select method-test based dataset and store ObjectRecord
this.clusterDataSet.putObject(action.getId(), action |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 198 |
junitx/ddtunit/data/db/DbDataRestorer.java | 235 |
sb.append(" </").append(oldOGroup).append(">" + LF);
sb.append(" </test>" + LF);
sb.append(" </group>" + LF); |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 218 |
junitx/ddtunit/data/ObjectAsserter.java | 226 |
} else if (ASSERT_ACTION_ISLT.equals(this.action.toUpperCase())) {
if (((Comparable) this.getActualObject()).compareTo(this
.getValue()) >= 0) { |
File | Line |
---|
junitx/ddtunit/ExceptionHandler.java | 141 |
junitx/ddtunit/ExceptionHandler.java | 283 |
Throwable firstException = null;
for (Iterator iter = assertMap.entrySet().iterator(); iter
.hasNext();) {
Entry assertEntry = (Entry) iter.next(); |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 239 |
junitx/ddtunit/util/ClassAnalyser.java | 307 |
String searchTerm) {
try {
Class c = Class.forName(qualifiedClassName);
Method[] m = c.getMethods();
Constructor[] ctor = c.getConstructors(); |
File | Line |
---|
junitx/ddtunit/data/processing/ReferenceProcessor.java | 86 |
junitx/ddtunit/data/processing/ReferenceProcessor.java | 101 |
for (int countA = 0; countA < this.refList.size(); countA++) {
IReferenceInfo infoA = (IReferenceInfo) this.refList
.get(countA); |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 350 |
junitx/ddtunit/data/processing/Engine.java | 360 |
.equals(qName))
&& level == LEVEL_TEST_OBJ) {
IAction action = null;
while (!this.actionStack.isEmpty()) {
action = this.actionStack.process();
} |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 204 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 271 |
((List) attribListAction.getValue()).add(successor.getObject());
} catch (Exception ex) {
throw new DDTException("Error on action processing", ex);
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 101 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 119 |
|| HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new DDTException("Unknown hint (" + hintValue
+ ")- stop processing.");
}
} else { |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 82 |
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 74 |
IAction rootAction = this.getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 118 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 204 |
((List<TypedObject>) attribListAction.getValue()).add(successor
.getObject());
} catch (Exception ex) {
throw new DDTException("Error on action processing", ex);
}
} |
File | Line |
---|
junitx/ddtunit/data/ExceptionAsserter.java | 115 |
junitx/ddtunit/data/ObjectAsserter.java | 359 |
ObjectAsserter newObj = new ObjectAsserter(this.getId(),
this.getType(), this.getAction());
newObj.setValue(this.getValue());
return newObj;
}
} |
File | Line |
---|
junitx/ddtunit/DDTTestResult.java | 139 |
junitx/ddtunit/DDTTestResult.java | 167 |
this.fListeners);
PrivilegedAccessor.setFieldValue(result, "fRunTests", new Integer(
this.fRunTests));
} catch (Exception e) {
e.printStackTrace();
throw new DDTException( |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 565 |
junitx/ddtunit/DDTTestCase.java | 599 |
} catch (Throwable ex) {
DDTException ddtEx;
if (DDTException.class.isInstance(ex)) {
ddtEx = (DDTException) ex;
} else {
ddtEx = new DDTTearDownException(ex.getMessage(), ex); |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 254 |
junitx/ddtunit/util/ClassAnalyser.java | 323 |
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Find a Constructor/Method of class className by using the argument list
* args and try to vary arguments which could be of primitive type. <br/>
* The args list only contains classes.
*
* @param className
* @param methodName
* @param args
* @return Method/Constructor object
*/
public static Object findMethodByParams(String className, |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 219 |
junitx/ddtunit/util/ClassAnalyser.java | 321 |
log.info(ctor[i].toString());
}
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
} |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 152 |
junitx/ddtunit/util/ClassAnalyser.java | 254 |
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Put all method names of the class qualifiedClassName into a String array
* and return it.
*
* @param qualifiedClassName Description of the Parameter
*
* @return array of all method names of the class to analyse
*
* @throws RuntimeException ClassAnalyserException if an error occures
*/
public static String[] getAllMethods(String qualifiedClassName) { |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 150 |
junitx/ddtunit/util/ClassAnalyser.java | 219 |
log.debug("=== End of Check");
}
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
} |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 124 |
junitx/ddtunit/util/ClassAnalyser.java | 289 |
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Display all constructors and methods of qualifiedClassName class which
* match with searchTerm. <br/>Output is set to Log4J Info level of this
* classes Logger.
*
* @param qualifiedClassName Name of class to analyse
* @param searchTerm Match term for methods to display
*
* @throws RuntimeException ClassAnalyserException if an error occures
*/
public static void showSelectedMethods(String qualifiedClassName, |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 123 |
junitx/ddtunit/util/ClassAnalyser.java | 152 |
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Search for exact match of searchTerm in the list of declared fields of
* the class qualifiedClassName.
*
* @param qualifiedClassName Description of the Parameter
* @param searchTerm Description of the Parameter
*
* @return Field that was found or null if field does not exists
*
* @throws RuntimeException ClassAnalyserException if an error occures
*/
public static Field getSelectedField(String qualifiedClassName, |
File | Line |
---|
junitx/ddtunit/optional/junit4/DDTUnit4ClassRunner.java | 126 |
junitx/ddtunit/optional/junit4/DDTUnit4ClassRunner.java | 139 |
if ((method.isAnnotationPresent(Before.class) && !method
.isAnnotationPresent(Ignore.class))) {
method.invoke(newInstance, new Object[] {});
}
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 133 |
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 119 |
this.injectedObject = new TypedObject(id, type);
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START"); |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 415 |
junitx/ddtunit/ExceptionHandler.java | 284 |
for (Iterator iter = assertMap.entrySet().iterator(); iter
.hasNext();) {
Entry assertEntry = (Entry) iter.next(); |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 153 |
junitx/ddtunit/util/ClassAnalyser.java | 289 |
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
}
/**
* Display all constructors and methods of qualifiedClassName class which
* match with searchTerm. <br/>Output is set to Log4J Info level of this
* classes Logger.
*
* @param qualifiedClassName Name of class to analyse
* @param searchTerm Match term for methods to display
*
* @throws RuntimeException ClassAnalyserException if an error occures
*/
public static void showSelectedMethods(String qualifiedClassName, |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 115 |
junitx/ddtunit/util/ClassAnalyser.java | 141 |
String searchTerm) {
try {
Class c = Class.forName(qualifiedClassName);
Field[] fields = c.getDeclaredFields();
log.debug("===Class " + qualifiedClassName
+ " fields selected by '" + searchTerm + "':"); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 141 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 183 |
StringBuffer setter = new StringBuffer();
try {
// returned type is never used but method may specify this type
// internally in injected object
this.getType();
if (this.getValue() == null) {
this.createObject();
} |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 99 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 119 |
|| HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new DDTException("Unknown hint (" + hintValue
+ ")- stop processing.");
}
} else { |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 126 |
junitx/ddtunit/data/db/DbDataRestorer.java | 294 |
"Error during access on db testdata", ex);
} finally {
if (connect != null) {
try {
connect.close();
} catch (SQLException ex) {
// ignore exception
}
}
}
return tObj; |
File | Line |
---|
junitx/ddtunit/DDTRunMonitor.java | 93 |
junitx/ddtunit/DDTRunMonitor.java | 190 |
public void endTest(Test test) {
String method = "";
if (TestCase.class.isInstance(test)) {
method = ((TestCase) test).getName();
} |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 221 |
junitx/ddtunit/util/ClassAnalyser.java | 254 |
}
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/MapCreatorAction.java | 122 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 227 |
} else if (HintTypes.CONTENT.equals(successor.getHint())) {
String content = successor.getValue().toString();
if (ContentCreatorAction.CONTENT_EMPTY.equals(content)) { |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 324 |
junitx/ddtunit/data/processing/Engine.java | 351 |
&& level == LEVEL_TEST_OBJ) {
IAction action = null;
while (!this.actionStack.isEmpty()) {
action = this.actionStack.process();
}
// select method-test based dataset and store ObjectRecord
this.actualDataSet |
File | Line |
---|
junitx/ddtunit/data/processing/DateCreatorAction.java | 222 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 247 |
DDTDateFormat formater = selectDateFormater(format, locale);
try {
if (formater.toString().length() == content.length()) {
date = formater.parse(content); |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 126 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 227 |
} else if (HintTypes.CONTENT.equals(successor.getHint())) {
String content = successor.getValue().toString();
if (ContentCreatorAction.CONTENT_EMPTY.equals(content)) { |
File | Line |
---|
junitx/framework/ObjectAssert.java | 162 |
junitx/framework/ObjectAssert.java | 183 |
Object expected,
Object actual) {
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.fail(formatted + "expected same as : <" + expected + "> but was <" + actual + ">"); |
File | Line |
---|
junitx/framework/Assert.java | 347 |
junitx/framework/Assert.java | 357 |
static private void failSame(String message,
Object expected) {
String formatted = "";
if (message != null) {
formatted = message + " ";
}
fail(formatted + "expected not same as: <" + expected + ">"); |
File | Line |
---|
junitx/framework/Assert.java | 116 |
junitx/framework/Assert.java | 129 |
Object actual) {
if ((expected == null && actual == null) ||
(expected != null && expected.equals(actual))) { |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 124 |
junitx/ddtunit/util/ClassAnalyser.java | 412 |
} catch (ClassNotFoundException ex) {
log.error("No such class: " + qualifiedClassName, ex);
throw new ClassAnalyserException("No class found of type "
+ qualifiedClassName, ex);
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 121 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 95 |
public SAXValidator() {
log.debug("DDTParser - constructor START");
try {
// the SAX way
// this.producer = XMLReaderFactory.createXMLReader();
// the jaxp1.1 way
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true); |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 140 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 132 |
if (HintTypes.INTERNAL_MAPENTRY.equals(successor.getHint())
&& ((SubelementCreatorAction) successor).hasReferenceInfo()) {
TypedObject destObject;
String linkType = successor.getAttribute(ParserConstants.XML_ATTR_VALUETYPE); |
File | Line |
---|
junitx/ddtunit/data/TypedObjectMap.java | 62 |
junitx/ddtunit/data/TypedObjectMap.java | 82 |
if (this.objectMap.containsKey(id)) {
Object value = objectMap.get(id);
if (MultiTypeMap.class.isInstance(value)) { |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 293 |
junitx/ddtunit/data/ObjectAsserter.java | 308 |
+ this.getId() + ")", ((Collection) this
.getValue()).contains(getActualObject()));
}
} |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 187 |
junitx/ddtunit/data/ObjectAsserter.java | 199 |
+ this.getId() + ")", ((Boolean) getActualObject())
.booleanValue());
} else {
throw new UnsupportedOperationException( |
File | Line |
---|
junitx/ddtunit/ExceptionHandler.java | 230 |
junitx/ddtunit/ExceptionHandler.java | 256 |
for (Iterator iter = this.methodTestError.values().iterator(); iter
.hasNext();) {
testFailure = (DDTTestFailure) iter.next();
sb.append("E-(").append(testFailure.getMethodTest()).append(") ") |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 246 |
junitx/ddtunit/util/ClassAnalyser.java | 283 |
for (int i = 0; i < m.length; i++) {
log.debug(m[i].toString()); |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 324 |
junitx/ddtunit/data/processing/Engine.java | 332 |
&& level == LEVEL_RESOURCE_OBJ) {
IAction action = null;
while (!this.actionStack.isEmpty()) {
action = this.actionStack.process();
} |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 112 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 174 |
try {
Class clazz = Class.forName(type);
Class superclazz = clazz;
boolean found = false;
while (!found && superclazz != null) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 142 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 149 |
for (int count = 0; count < fields.size(); count++) {
field = (TypedObject) fields.get(count); |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 197 |
junitx/ddtunit/data/db/DbDataRestorer.java | 212 |
startTests = false;
sb.append(" </").append(oldOGroup).append(
">" + LF);
sb.append(" </test>" + LF); |
File | Line |
---|
junitx/framework/ThrowableAssert.java | 82 |
junitx/framework/ThrowableAssert.java | 117 |
public static void assertSimilar(String message,
Throwable expected,
Throwable actual) {
ObjectAssert.assertInstanceOf(message, expected.getClass(), actual);
if (expected.getMessage() == null) { |
File | Line |
---|
junitx/framework/ArrayAssert.java | 102 |
junitx/framework/ArrayAssert.java | 163 |
for (int i = 0; i < actual.length; i++) {
Assert.assertEquals(formatted + "[position " + i + "]", expected[i], actual[i], delta); |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 329 |
junitx/ddtunit/data/processing/Engine.java | 338 |
DDTDataRepository.getInstance().putObject(action.getId(),
action.getObject());
this.processResource = false;
} else if (ParserConstants.XML_ELEM_OBJ.equals(qName)
&& level == LEVEL_CLUSTER_GLOBAL_OBJ) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 116 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 160 |
ActionState.ATTRLIST_CREATION, attribMap);
action.inject();
action.setValue(new Vector());
this.insert(action);
action.process();
} |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 322 |
junitx/ddtunit/data/db/DbDataRestorer.java | 326 |
ExceptionAsserter asserter = new ExceptionAsserter(id, type, action);
asserter.setValue(tObj.getValue());
testDataSet.putAssert(id, asserter);
} else { |
File | Line |
---|
junitx/ddtunit/data/TypedObjectMap.java | 85 |
junitx/ddtunit/data/TypedObjectMap.java | 105 |
.next()).getValue();
} else if (TypedObject.class.isInstance(value)) {
obj = (TypedObject) value;
}
}
return obj;
}
public Set entrySet() { |
File | Line |
---|
junitx/ddtunit/DDTRunMonitor.java | 96 |
junitx/ddtunit/DDTRunMonitor.java | 219 |
if (TestCase.class.isInstance(test)) {
method = ((TestCase) test).getName();
}
log.debug("[" + test.getClass() + "] Start method \"" + method + "\""); |
File | Line |
---|
junitx/framework/ObjectAssert.java | 173 |
junitx/framework/ObjectAssert.java | 194 |
Object expected) {
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.fail(formatted + "expected not same as : <" + expected + ">"); |
File | Line |
---|
junitx/framework/Assert.java | 314 |
junitx/framework/ObjectAssert.java | 145 |
assertNotSame(null, expected, actual);
}
/**
* Asserts that an object are not the same. Throws an
* <tt>AssertionFailedError</tt> if they are.
*/
public static void assertNotSame(String message,
Object expected,
Object actual) {
if (expected != actual) { |
File | Line |
---|
junitx/framework/Assert.java | 194 |
junitx/framework/Assert.java | 223 |
failNotEquals(message, new Float(expected));
}
} else if (Math.abs(expected - actual) <= delta) {
failNotEquals(message, new Float(expected)); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 131 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 148 |
this.attrMap.remove(ParserConstants.XML_ATTR_CONTENT);
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 79 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 103 |
} else if (HintTypes.FIELDS.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.COLLECTION.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 86 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 113 |
|| HintTypes.ARRAY.equals(hintValue)
|| HintTypes.FIELDS.equals(hintValue)
|| HintTypes.COLLECTION.equals(hintValue)
|| HintTypes.MAP.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/db/DbDataRestorer.java | 213 |
junitx/ddtunit/data/db/DbDataRestorer.java | 235 |
sb.append(" </").append(oldOGroup).append(">" + LF);
sb.append(" </test>" + LF); |
File | Line |
---|
junitx/ddtunit/data/ExceptionAsserter.java | 82 |
junitx/ddtunit/data/ObjectAsserter.java | 121 |
public void validate(boolean mark) {
if (!this.actualObjectSet) {
throw new DDTException("Actual object for assertion not provided");
} else if (ASSERT_ACTION_ISEQUAL.equals(this.action.toUpperCase())) { |
File | Line |
---|
junitx/framework/ObjectAssert.java | 163 |
junitx/framework/ObjectAssert.java | 194 |
Class expected) {
String formatted = "";
if (message != null) {
formatted = message + " ";
}
Assert.fail(formatted + "expected not instance of class: <" + expected.getName() + ">"); |
File | Line |
---|
junitx/framework/Assert.java | 347 |
junitx/framework/ObjectAssert.java | 193 |
static private void failNotSame(String message,
Object expected) {
String formatted = "";
if (message != null) {
formatted = message + " ";
} |
File | Line |
---|
junitx/ddtunit/util/PrivilegedAccessor.java | 44 |
junitx/ddtunit/util/PrivilegedAccessor.java | 67 |
Object value) throws IllegalAccessException, NoSuchFieldException {
Field field = getField(instance.getClass(), fieldName);
field.setAccessible(true); |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 244 |
junitx/ddtunit/util/ClassAnalyser.java | 403 |
log.debug("===Class " + qualifiedClassName + " methods:");
for (int i = 0; i < m.length; i++) { |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 84 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 87 |
private static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
private static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
private static final String LF = System.getProperty("line.separator"); |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ErrorHandler.java | 84 |
junitx/ddtunit/data/processing/parser/ErrorHandler.java | 95 |
public void fatalError(SAXParseException exception) throws SAXException {
log.error(printParseException("Error", exception), exception);
if ((flags & FATAL_IGNORE) == 0) { |
File | Line |
---|
junitx/ddtunit/data/processing/MapCreatorAction.java | 92 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 266 |
this.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List) attribListAction.getValue()).add(successor.getObject()); |
File | Line |
---|
junitx/ddtunit/data/processing/DateCreatorAction.java | 140 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 184 |
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.ATTRLIST.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/DateCreatorAction.java | 93 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 68 |
public MapCreatorAction(Map<String, String> attrMap) {
super(attrMap);
}
/*
* (non-Javadoc)
* @see junitx.ddtunit.parser.ActionBase#process()
*/
public IAction process() {
log.debug("process MapCreator Action - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/ContentCreatorAction.java | 149 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 184 |
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.ATTRLIST.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ContentCreatorAction.java | 77 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 93 |
public DateCreatorAction(Map<String, String> attrMap) {
super(attrMap);
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#process()
*/
public IAction process() {
log.debug("process DateCreator - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 120 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 184 |
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
// create attribute list action and insert after rootAction
if (HintTypes.ATTRLIST.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 63 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 93 |
public ContentCreatorAction(Map<String, String> attrMap) {
super(attrMap);
}
/**
* Contract constraints on processing of Content action: <br/>
* <ul>
* <li>Content action must be the last on action stack</li>
* <li>There must be a valid root action distinct from content action.</li>
* <li> </li>
* </ul>
* @see junitx.ddtunit.data.processing.ActionBase#process()
*/
public IAction process() {
log.debug("Process ContentCreator - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 83 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 84 |
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 68 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 77 |
public ConstantCreatorAction(Map<String, String> attrMap) {
super(attrMap);
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#process()
*/
public IAction process() {
log.debug("process ConstantCreator - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 226 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 92 |
rootAction.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List) attribListAction.getValue()).add(this.getObject()); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 81 |
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 75 |
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 147 |
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 186 |
} catch (ClassNotFoundException ex) {
StringBuffer sb = new StringBuffer(
"Error on setting elements of array.");
throw new DDTException(sb.toString(), ex);
}
} |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 114 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 92 |
rootAction.insert(attribListAction);
try {
// create container
attribListAction.createObject();
// initialize with first list element
((List) attribListAction.getValue()).add(this.getObject()); |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 68 |
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 63 |
public CallCreatorAction(Map<String, String> attrMap) {
super(attrMap);
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#process()
*/
public IAction process() {
log.debug("process CallCreator - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 461 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 259 |
}
public void resolve(IDataSet dataSet, String groupId, String testId) {
if (ParserConstants.UNKNOWN.equals(groupId) |
File | Line |
---|
junitx/ddtunit/DDTRunMonitor.java | 192 |
junitx/ddtunit/DDTRunMonitor.java | 219 |
if (TestCase.class.isInstance(test)) {
method = ((TestCase) test).getName();
} |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 245 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 169 |
throw DDTException.create(new StringBuffer(
"Error on behalf of xml test resource."), e);
} catch (SAXException e) {
StringBuffer sb = new StringBuffer( |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 232 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 137 |
this.consumer = new DefaultHandler();
Locator locator = new LocatorImpl();
this.consumer.setDocumentLocator(locator);
this.producer.setContentHandler(consumer); |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 133 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 104 |
this.producer = factory.newSAXParser().getXMLReader();
// this.producer = new SAXParser();
this.producer.setFeature(XML_NAMESPACE_PREFIX_URI, false);
this.producer.setFeature(XML_NAMESPACE_URI, true); |
File | Line |
---|
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 325 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 330 |
} catch (NoSuchFieldException ex) {
throw new DDTTestDataException(
"Error resolving reference of " + dest
+ " to field " + this.field + " on "
+ source, ex);
} |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 89 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 105 |
} else if (HintTypes.COLLECTION.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.MAP.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 212 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 225 |
+ this.getId(), ex);
}
} else if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 184 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 193 |
try {
this.getType();
// if TypedObject is not instanciated and it is no call
// operation
// create object by default constructor
if (this.getValue() == null){
// && !HintTypes.CALL.equals(this.getHint())) {
this.createObject();
} |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 123 |
junitx/ddtunit/data/processing/ActionBase.java | 131 |
public void promoteLinkChangeListener(IAction action) {
for (int count = 0; count < this.changeListeners.size(); count++) { |
File | Line |
---|
junitx/framework/ThrowableAssert.java | 155 |
junitx/framework/ThrowableAssert.java | 157 |
} else {
Assert.fail(formatted + "Expected containing <" + expected.getMessage() + "> in <" + actual.getMessage() + "> or <" + actual.getLocalizedMessage() + "> (localized)"); |
File | Line |
---|
junitx/framework/Assert.java | 338 |
junitx/framework/Assert.java | 348 |
Object expected) {
String formatted = "";
if (message != null) {
formatted = message + " ";
}
fail(formatted + "expected not equals to: <" + expected + ">"); |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 311 |
junitx/ddtunit/util/ClassAnalyser.java | 403 |
log.debug("===Class " + qualifiedClassName + " methods:");
for (int i = 0; i < m.length; i++) {
if (m[i].getName().endsWith(methodName)){ |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 239 |
junitx/ddtunit/util/ClassAnalyser.java | 398 |
public static Method findMethodByName(String qualifiedClassName, String methodName) {
try {
Class c = Class.forName(qualifiedClassName);
Method[] m = c.getMethods(); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 133 |
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 122 |
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START");
if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 105 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 109 |
}
this.pop();
return this;
}
public void processNoSuccessor() {
// process direct object call providing no parameters (empty tag)
IAction action = new AttributeListCreatorAction(
new HashMap<String, String>()); |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 121 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 190 |
}
superclazz = superclazz.getSuperclass();
}
if (!found) {
throw new DDTException("Container class '" + type
+ "' does not implement java.util.Map."); |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 121 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 225 |
+ this.getId(), ex);
}
} else if (HintTypes.CONTENT.equals(successor.getHint())) {
String content = successor.getValue().toString(); |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 283 |
junitx/ddtunit/data/ObjectAsserter.java | 296 |
} else {
// actual type == array type do separate contain check
if (this.getActualType().startsWith("[L")) {
match = isArrayContainedinList(assertEx);
if (match) { |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 220 |
junitx/ddtunit/data/ObjectAsserter.java | 237 |
.getValue()) >= 0) {
Assert.fail("Expected action: " + this.getAction()
+ ". Got: " + this.getActualObject() + " >= " |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 172 |
junitx/ddtunit/data/ObjectAsserter.java | 177 |
} else if (ASSERT_ACTION_ISNOTNULL.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
isSameType();
Assert.assertNotNull("Object should not be null on assert (" |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 166 |
junitx/ddtunit/data/ObjectAsserter.java | 170 |
Assert.assertNotSame("Wrong isNotSame assert (" + this.getId()
+ ")", this.getValue(), getActualObject());
} else if (ASSERT_ACTION_ISNULL.equals(this.action.toUpperCase())) { |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 163 |
junitx/ddtunit/data/ObjectAsserter.java | 177 |
} else if (ASSERT_ACTION_ISNULL.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
isSameType();
Assert.assertNull("Object should be null on assert (" |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 161 |
junitx/ddtunit/data/ObjectAsserter.java | 166 |
Assert.assertSame("Wrong isSame assert (" + this.getId() + ")",
this.getValue(), getActualObject());
} else if (ASSERT_ACTION_ISNOTSAME.equals(this.action.toUpperCase())) { |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 570 |
junitx/ddtunit/DDTTestCase.java | 604 |
ddtEx = new DDTTearDownException(ex.getMessage(), ex);
}
this.testResult.addMethodTestError(this, testId, ddtEx);
} |
File | Line |
---|
junitx/framework/Assert.java | 327 |
junitx/framework/ObjectAssert.java | 137 |
}
/**
* Asserts that an object are not the same. Throws an
* <tt>AssertionFailedError</tt> if they are.
*/
public static void assertNotSame(Object expected,
Object actual) {
assertNotSame(null, expected, actual);
} |
File | Line |
---|
junitx/framework/Assert.java | 208 |
junitx/framework/Assert.java | 237 |
float delta) {
assertNotEquals(null, expected, actual, delta);
}
/**
* Asserts that two ints are not equal. Throws an
* <tt>AssertionFailedError</tt> if they are equal.
*/
public static void assertNotEquals(String message, |
File | Line |
---|
junitx/framework/ArrayAssert.java | 264 |
junitx/framework/ArrayAssert.java | 410 |
boolean[] actual) {
assertEquals(null, expected, actual);
}
/**
* Asserts that two arrays are equal. Two arrays are considered equal if:
* <ul>
* <li>their respective lengths are the same</i>
* <li>all corresponding pairs of elements are equal
* <li>both array references are <code>null</code>
* </ul>
*
* @param message message to display when arrays are not equal
* @param expected a byte array of expected values
* @param actual a byte array of actual values
*/
public static void assertEquals(String message, |
File | Line |
---|
junitx/framework/ArrayAssert.java | 130 |
junitx/framework/ArrayAssert.java | 216 |
float delta) {
assertEquals(null, expected, actual, delta);
}
/**
* Asserts that two arrays are equal. Two arrays are considered equal if:
* <ul>
* <li>their respective lengths are the same</i>
* <li>all corresponding pairs of elements are equal
* <li>both array references are <code>null</code>
* </ul>
*
* @param message message to display when arrays are not equal
* @param expected a long array of expected values
* @param actual a long array of actual values
*/
public static void assertEquals(String message, |
File | Line |
---|
junitx/ddtunit/data/processing/parser/ParserImpl.java | 278 |
junitx/ddtunit/data/processing/parser/SAXValidator.java | 161 |
} else {
iSource = new InputSource(in);
iSource.setSystemId(this.getClass().getResource(resourceName) |
File | Line |
---|
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 142 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 153 |
refInfo = new SubelementReferenceInfo(this.getPrevious()
.getObject(), this.getId(), destObject);
add(refInfo);
} |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 128 |
junitx/ddtunit/data/processing/Engine.java | 133 |
this.processResource = true;
this.actionStack = new ActionStack();
pushAction(qName, attrMap);
} else if (ParserConstants.XML_ELEM_CLUSTER.equals(qName) |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 74 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 81 |
IAction rootAction = getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.CONSTRUCTOR.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 97 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 103 |
} else if (HintTypes.FIELDS.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.COLLECTION.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 242 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 267 |
sigObjects = new Object[max];
for (int pos = 0; pos < max; pos++) {
TypedObject tObject = (TypedObject) objectList.get(pos); |
File | Line |
---|
junitx/ddtunit/data/processing/CallCreatorAction.java | 82 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 81 |
IAction rootAction = getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.CONSTRUCTOR.equals(hintValue) |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 133 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 139 |
this.attrMap.remove(ParserConstants.XML_ATTR_CONTENT);
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 137 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 190 |
if (HintTypes.ATTRLIST.equals(successor.getHint())) {
List fields = (List) successor.getObject().getValue();
TypedObject field = null;
try { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 121 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 212 |
throw new DDTException(sb.toString(), ex);
}
} else if (HintTypes.CONTENT.equals(successor.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 120 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 99 |
} catch (Exception ex) {
throw new DDTException("Error on action processing", ex);
}
} else if (HintTypes.FIELDS.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 82 |
junitx/ddtunit/data/processing/DateCreatorAction.java | 107 |
IAction rootAction = this.getPrevious();
if (rootAction != null) {
String hintValue = rootAction.getHint();
if (HintTypes.COLLECTION.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 249 |
junitx/ddtunit/data/ObjectAsserter.java | 258 |
+ " not in " + this.getValue() + " on assert ("
+ this.getId() + ")");
}
} else if (ASSERT_ACTION_ISNOTINRANGE.equals(this.action |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 246 |
junitx/ddtunit/data/ObjectAsserter.java | 255 |
.getActualObject())) {
Assert.fail("Expected action: " + this.getAction()
+ ". Got: " + this.getActualObject()
+ " not in " + this.getValue() + " on assert (" |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 240 |
junitx/ddtunit/data/ObjectAsserter.java | 258 |
+ " not in " + this.getValue() + " on assert ("
+ this.getId() + ")");
}
} else if (ASSERT_ACTION_ISNOTINRANGE.equals(this.action |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 229 |
junitx/ddtunit/data/ObjectAsserter.java | 255 |
.getActualObject())) {
Assert.fail("Expected action: " + this.getAction()
+ ". Got: " + this.getActualObject()
+ " not in " + this.getValue() + " on assert (" |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 223 |
junitx/ddtunit/data/ObjectAsserter.java | 249 |
+ this.getValue() + " on assert ("
+ this.getId() + ")");
}
} else if (ASSERT_ACTION_ISNOTLT.equals(this.action |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 220 |
junitx/ddtunit/data/ObjectAsserter.java | 255 |
.getActualObject())) {
Assert.fail("Expected action: " + this.getAction()
+ ". Got: " + this.getActualObject()
+ " not in " + this.getValue() + " on assert (" |
File | Line |
---|
junitx/framework/ComparisonFailure.java | 192 |
junitx/framework/ThrowableAssert.java | 150 |
Throwable actual) {
String formatted = "";
if (message != null) {
formatted = message + " ";
}
if (actual.getMessage().equals(actual.getLocalizedMessage())) { |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 314 |
junitx/ddtunit/util/ClassAnalyser.java | 320 |
if (ctor[i].toString().indexOf(searchTerm) != -1) {
log.info(ctor[i].toString()); |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 148 |
junitx/ddtunit/data/processing/Engine.java | 193 |
if (this.refProcessor == null) {
this.refProcessor = new ReferenceProcessor(
this.clusterDataSet);
} |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 92 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 84 |
if (HintTypes.CONSTRUCTOR.equals(hintValue)
|| HintTypes.CALL.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 134 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 184 |
return this;
}
public void processSuccessor(IAction successor) {
log.debug("processSuccessor(" + successor + ") - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 76 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 84 |
if (HintTypes.CONSTRUCTOR.equals(hintValue)
|| HintTypes.CALL.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 468 |
junitx/ddtunit/data/processing/ActionBase.java | 494 |
TypedObject source = testDataSet.getObject(this
.getSourceId(), this.getSourceType());
if (source == null && testDataSet instanceof TestDataSet) { |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 255 |
junitx/ddtunit/data/processing/ActionBase.java | 258 |
} else if ("value".equals(this.injectedObject.getId())) {
objectType = rootAction
.getAttribute(ParserConstants.XML_ATTR_VALUETYPE); |
File | Line |
---|
junitx/ddtunit/data/processing/ActionBase.java | 116 |
junitx/ddtunit/data/processing/ActionBase.java | 123 |
private void removeFromLinkChangeListener(IAction action) {
for (int count = 0; count < this.changeListeners.size(); count++) { |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 124 |
junitx/ddtunit/data/ObjectAsserter.java | 163 |
} else if (ASSERT_ACTION_ISSAME.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
isSameType(); |
File | Line |
---|
junitx/ddtunit/data/ExceptionAsserter.java | 87 |
junitx/ddtunit/data/ExceptionAsserter.java | 91 |
ThrowableAssert.assertSimilar("Unexpected exception",
(Throwable) getValue(), (Throwable) getActualObject());
} else if (EXCEPTION_ACTION_ISINSTANCEOF.equals(this.action |
File | Line |
---|
junitx/ddtunit/DDTTestResult.java | 112 |
junitx/ddtunit/DDTTestResult.java | 142 |
} catch (Exception e) {
e.printStackTrace();
throw new DDTException(
"Error on transforming TestResult to DDTResult", e);
} |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 247 |
junitx/ddtunit/DDTTestCase.java | 269 |
"Error retrieving testdata, could not find object.");
} else {
obj = typedObject.getValue();
}
return obj;
}
/**
* Retrieve object with specified identifier on a per class basis. <br/>If
* no data exists an exception will be raised.
*
* @param objectId
* specifies key for retrieval
*
* @return Object that is stored under identifier key
*/
protected Object getGlobalObject(String objectId, String objectType) { |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 205 |
junitx/ddtunit/DDTTestCase.java | 362 |
if (!this.classDataSet.containsKey(this.getName())) {
throw new DDTException("No asserts defined in method scope"); |
File | Line |
---|
junitx/framework/ObjectAssert.java | 163 |
junitx/framework/ThrowableAssert.java | 150 |
Throwable actual) {
String formatted = "";
if (message != null) {
formatted = message + " ";
} |
File | Line |
---|
junitx/framework/Assert.java | 348 |
junitx/framework/ObjectAssert.java | 173 |
Class expected) {
String formatted = "";
if (message != null) {
formatted = message + " ";
} |
File | Line |
---|
junitx/framework/Assert.java | 141 |
junitx/framework/Assert.java | 179 |
short actual) {
assertNotEquals(null, expected, actual);
}
/**
* Asserts that two boolean are not equal. Throws an
* <tt>AssertionFailedError</tt> if they are equal.
*/
public static void assertNotEquals(String message, |
File | Line |
---|
junitx/framework/ArrayAssert.java | 264 |
junitx/framework/Assert.java | 108 |
public static void assertEquals(String expected, String actual) {
assertEquals(null, expected, actual);
}
/**
* Asserts that two strings are equal. Throws an
* <tt>AssertionFailedError</tt> if not.
*/
public static void assertEquals(String message, String expected, String actual) { |
File | Line |
---|
junitx/ddtunit/util/ClassAnalyser.java | 728 |
junitx/ddtunit/util/ClassAnalyser.java | 745 |
packageName = clazz.getPackage().getName().replaceAll(
"\\.", pathSeparator);
}
}
return packageName;
} |
File | Line |
---|
junitx/ddtunit/data/processing/MapCreatorAction.java | 89 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 263 |
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap); |
File | Line |
---|
junitx/ddtunit/data/processing/Engine.java | 129 |
junitx/ddtunit/data/processing/Engine.java | 154 |
this.actionStack = new ActionStack();
pushAction(qName, attrMap);
} else if (ParserConstants.XML_ELEM_EXCEPTION.equals(qName) |
File | Line |
---|
junitx/ddtunit/data/processing/ConstantCreatorAction.java | 78 |
junitx/ddtunit/data/processing/ContentCreatorAction.java | 115 |
|| HintTypes.COLLECTION.equals(hintValue)
|| HintTypes.MAP.equals(hintValue)
|| HintTypes.BEAN.equals(hintValue)) { |
File | Line |
---|
junitx/ddtunit/data/processing/CollectionCreatorAction.java | 97 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 107 |
} else if (HintTypes.MAP.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new UnsupportedOperationException( |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 223 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 89 |
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap); |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 176 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 216 |
.append(". Check if hint is correct.");
throw new DDTException(sb.toString(), ex);
}
} else if (HintTypes.INTERNAL_MAPENTRY.equals(this.getHint())) { |
File | Line |
---|
junitx/ddtunit/data/processing/BeanCreatorAction.java | 66 |
junitx/ddtunit/data/processing/SubelementCreatorAction.java | 69 |
public SubelementCreatorAction(Map attrMap) {
super(attrMap);
}
/*
* (non-Javadoc)
*
* @see junitx.ddtunit.parser.ActionBase#process()
*/
public IAction process() {
log.debug("process SubelementCreator - START"); |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 83 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 107 |
} else if (HintTypes.MAP.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new UnsupportedOperationException( |
File | Line |
---|
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 74 |
junitx/ddtunit/data/processing/CallCreatorAction.java | 101 |
} else if (HintTypes.INTERNAL_MAPENTRY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else { |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 137 |
junitx/ddtunit/data/processing/BeanCreatorAction.java | 138 |
if (HintTypes.ATTRLIST.equals(successor.getHint())) {
List fields = (List) successor.getObject().getValue();
TypedObject field = null; |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 111 |
junitx/ddtunit/data/processing/MapCreatorAction.java | 89 |
Map attribMap = new HashMap();
IAction attribListAction = ActionFactory.getAction(
ActionState.ATTRLIST_CREATION, attribMap); |
File | Line |
---|
junitx/ddtunit/data/processing/ArrayCreatorAction.java | 89 |
junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 83 |
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else {
throw new UnsupportedOperationException( |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 182 |
junitx/ddtunit/data/ObjectAsserter.java | 211 |
|| ASSERT_ACTION_ISNOTINRANGE.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
// if doing range checks do not check expected and actual types
if (!(this.getValue() instanceof IRange)) { |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 159 |
junitx/ddtunit/data/ObjectAsserter.java | 168 |
} else if (ASSERT_ACTION_ISNOTSAME.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
Assert.assertNotSame("Wrong isNotSame assert (" + this.getId() |
File | Line |
---|
junitx/ddtunit/data/ObjectAsserter.java | 155 |
junitx/ddtunit/data/ObjectAsserter.java | 170 |
Assert.assertNotEquals("Wrong isNotEqual assert (" + this.getId()
+ ")", this.getValue(), getActualObject());
} else if (ASSERT_ACTION_ISSAME.equals(this.action.toUpperCase())) { |
File | Line |
---|
junitx/ddtunit/data/ExceptionAsserter.java | 85 |
junitx/ddtunit/data/ExceptionAsserter.java | 89 |
} else if (EXCEPTION_ACTION_ISSIMILAR.equals(this.action.toUpperCase())) {
this.markAsProcessed = mark;
ThrowableAssert.assertSimilar("Unexpected exception", |
File | Line |
---|
junitx/ddtunit/ExceptionHandler.java | 136 |
junitx/ddtunit/ExceptionHandler.java | 173 |
log.debug("filter(" + methodName + ", " + testId + ", "
+ aThrowable.getMessage() + ") found: " |
File | Line |
---|
junitx/ddtunit/ExceptionHandler.java | 93 |
junitx/ddtunit/ExceptionHandler.java | 102 |
log.debug("process(" + methodName + ", " + testId + ", "
+ aThrowable.getMessage() + ") - END"); |
File | Line |
---|
junitx/ddtunit/DDTTestCase.java | 72 |
junitx/ddtunit/data/processing/parser/ErrorHandler.java | 67 |
private static final String LF = System.getProperty("line.separator");
private Logger log = LoggerFactory.getLogger(ErrorHandler.class); |