Commit b8df9c5b authored by Martti Käärik's avatar Martti Käärik
Browse files

Default unmapped collections to List + corrected get syntax.

parent 41cf0856
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2060,14 +2060,14 @@ public class JUnitTestGenerator extends Renderer {
	}

	private void writeCollectionIdnex(DataType t, DataUse idx, Map<DataUse, String> dataUseVariables) {
		boolean isArray = true;
		boolean isArray = false;
		DataElementMapping m = getMapping(t);
		if (m != null) {
			String mappedType = m.getElementURI();
			if (!mappedType.contains("[]"))
				isArray = false;
			if (mappedType.contains("[]"))
				isArray = true;
		} else {
			// Fall back to type array
			// Fall back to type List
		}

		Stack<Reference> dataUseVariableRef = new Stack<Reference>();
@@ -2077,10 +2077,10 @@ public class JUnitTestGenerator extends Renderer {
			write(idx, dataUseVariables);
			append("]");
		} else {
			append("read");
			append(".get");
			append("(");
			write(idx, dataUseVariables);
			line(");");
			append(")");
		}
	}