The following document contains the results of PMD's CPD 4.2.2.
| 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 | 286 |
}
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/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/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 | 136 |
| 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 | 335 |
}
}
/**
* 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/CollectionCreatorAction.java | 282 |
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 | 256 |
}
} 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/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 | 329 |
| 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/ddtunit/data/processing/CallCreatorAction.java | 186 |
| junitx/ddtunit/data/processing/SubelementCreatorAction.java | 215 |
} 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 | 309 |
| 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/AttributeListCreatorAction.java | 96 |
}
/*
* (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 | 338 |
| 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 | 187 |
| junitx/ddtunit/DDTTestCase.java | 218 |
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/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 | 180 |
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/BeanCreatorAction.java | 93 |
|| 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 | 186 |
| 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 | 180 |
| junitx/ddtunit/data/processing/parser/ParserImpl.java | 331 |
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 | 142 |
| junitx/ddtunit/data/processing/SubelementCreatorAction.java | 189 |
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 | 176 |
| junitx/ddtunit/data/processing/parser/ParserImpl.java | 240 |
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 | 138 |
}
/*
* (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 | 314 |
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/BeanCreatorAction.java | 90 |
} 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/CollectionCreatorAction.java | 265 |
} 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 | 147 |
}
/*
* (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 | 146 |
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 | 146 |
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 | 147 |
}
/*
* (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 | 160 |
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 | 146 |
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 | 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 | 256 |
}
} 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 | 104 |
} 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/CallCreatorAction.java | 88 |
| junitx/ddtunit/data/processing/CollectionCreatorAction.java | 91 |
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ATTRLIST.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.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 | 95 |
| 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/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/BeanCreatorAction.java | 86 |
| junitx/ddtunit/data/processing/CollectionCreatorAction.java | 91 |
} else if (HintTypes.ARRAY.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.ATTRLIST.equals(hintValue)) {
rootAction.processSuccessor(this);
} else if (HintTypes.BEAN.equals(hintValue)) {
| |
| File | Line |
|---|---|
| junitx/ddtunit/data/processing/AttributeListCreatorAction.java | 96 |
| junitx/ddtunit/data/processing/SubelementCreatorAction.java | 162 |
}
/*
* (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/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/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 | 76 |
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 | 180 |
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/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/ConstantCreatorAction.java | 121 |
}
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 | 110 |
"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/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 | 243 |
} 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 | 267 |
((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/ConstantCreatorAction.java | 86 |
|| 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 | 551 |
| junitx/ddtunit/DDTTestCase.java | 585 |
} 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 | 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 | 401 |
| junitx/ddtunit/ExceptionHandler.java | 142 |
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/ConstantCreatorAction.java | 86 |
|| 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 | 223 |
} 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 |