diff --git a/de.gebit.integrity.tests/integrity/fixtures/NoOpFixture.integrity b/de.gebit.integrity.tests/integrity/fixtures/NoOpFixture.integrity index 562f2341e..984dbbe2b 100644 --- a/de.gebit.integrity.tests/integrity/fixtures/NoOpFixture.integrity +++ b/de.gebit.integrity.tests/integrity/fixtures/NoOpFixture.integrity @@ -94,5 +94,7 @@ packagedef integrity.fixtures.basic.noop with testdef throwAbortExceptionTest uses de.gebit.integrity.tests.fixtures.basic.NoOpFixture#throwAbortException calldef generateCharacter uses de.gebit.integrity.tests.fixtures.basic.NoOpFixture#generateCharacter + + calldef generateArray uses de.gebit.integrity.tests.fixtures.basic.NoOpFixture#generateArray packageend \ No newline at end of file diff --git a/de.gebit.integrity.tests/integrity/suites/basic/simpleFixtureCalls.integrity b/de.gebit.integrity.tests/integrity/suites/basic/simpleFixtureCalls.integrity index 7b2877beb..b6c7d9764 100644 --- a/de.gebit.integrity.tests/integrity/suites/basic/simpleFixtureCalls.integrity +++ b/de.gebit.integrity.tests/integrity/suites/basic/simpleFixtureCalls.integrity @@ -67,6 +67,16 @@ packagedef integrity.basic with suiteend + + suitedef simpleArrayCreationAndPassing with + + // This failed because of issue 199 + variable someVariable + call integrity.fixtures.basic.noop.generateArray -> someVariable + call integrity.fixtures.basic.noop.echoObject echo: someVariable + + suiteend + packageend \ No newline at end of file diff --git a/de.gebit.integrity.tests/junit/de/gebit/integrity/tests/junit/basic/SimpleFixtureCalls.java b/de.gebit.integrity.tests/junit/de/gebit/integrity/tests/junit/basic/SimpleFixtureCalls.java index 638815628..4fe950962 100644 --- a/de.gebit.integrity.tests/junit/de/gebit/integrity/tests/junit/basic/SimpleFixtureCalls.java +++ b/de.gebit.integrity.tests/junit/de/gebit/integrity/tests/junit/basic/SimpleFixtureCalls.java @@ -85,4 +85,19 @@ public void testSimpleFixtureCallWithTwoParams() throws ModelLoadException, IOEx assertDocumentMatchesReference(tempResult); } + /** + * Performs a suite which does tests and checks the resulting XML document. + * + * @throws ModelLoadException + * @throws IOException + * @throws JDOMException + */ + @Test + public void testSimpleArrayCreationAndPassing() throws ModelLoadException, IOException, JDOMException { + Document tempResult = executeIntegritySuite( + new String[] { "integrity/suites/basic/simpleFixtureCalls.integrity" }, + "integrity.basic.simpleArrayCreationAndPassing", null); + assertDocumentMatchesReference(tempResult); + } + } diff --git a/de.gebit.integrity.tests/results/integrity.basic.simpleArrayCreationAndPassing.xml b/de.gebit.integrity.tests/results/integrity.basic.simpleArrayCreationAndPassing.xml new file mode 100644 index 000000000..b4387343a --- /dev/null +++ b/de.gebit.integrity.tests/results/integrity.basic.simpleArrayCreationAndPassing.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de.gebit.integrity.tests/src/de/gebit/integrity/tests/fixtures/basic/NoOpFixture.java b/de.gebit.integrity.tests/src/de/gebit/integrity/tests/fixtures/basic/NoOpFixture.java index 6a025d97d..b46398b52 100644 --- a/de.gebit.integrity.tests/src/de/gebit/integrity/tests/fixtures/basic/NoOpFixture.java +++ b/de.gebit.integrity.tests/src/de/gebit/integrity/tests/fixtures/basic/NoOpFixture.java @@ -226,6 +226,15 @@ public String generateCharacter(@FixtureParameter(name = "code") int aCharacterC return tempChar; } + @FixtureMethod(description = "Creates an array") + public Long[] generateArray() { + Long[] tempTestArray = new Long[5]; + for (int i = 0; i < 5; i++) { + tempTestArray[i] = new Long(i); + } + return tempTestArray; + } + public enum Enum { VALUE1,