-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v0.12.x_bugfix' into v0.12.x
- Loading branch information
Showing
10 changed files
with
542 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
de.gebit.integrity.tests/integrity/fixtures/ByteArrayConversionTestFixture.integrity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
packagedef integrity.fixtures.basic.bytearray with | ||
|
||
calldef createByteArrayFromStringCall uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#createByteArrayFromString | ||
testdef createByteArrayFromStringTest uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#createByteArrayFromString | ||
|
||
calldef createByteWrapperArrayFromStringCall uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#createByteWrapperArrayFromString | ||
testdef createByteWrapperArrayFromStringTest uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#createByteWrapperArrayFromString | ||
|
||
testdef testByteArray uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#testByteArray | ||
testdef testByteWrapperArray uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#testByteWrapperArray | ||
|
||
testdef testContainer uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#testContainer | ||
testdef testWrapperContainer uses de.gebit.integrity.tests.fixtures.basic.ByteArrayConversionTestFixture#testWrapperContainer | ||
|
||
packageend |
55 changes: 55 additions & 0 deletions
55
de.gebit.integrity.tests/integrity/suites/basic/bytearray/byteArrayConversionTest.integrity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import integrity.fixtures.basic.bytearray.* | ||
|
||
packagedef integrity.basic.bytearray with | ||
|
||
suitedef simpleConversionTests with | ||
|
||
-- This should succeed | ||
test testByteArray array: "Test" | ||
-- This should fail | ||
test testByteArray array: "Fail" | ||
|
||
-- This should succeed | ||
test testByteWrapperArray array: "Test" | ||
-- This should fail | ||
test testByteWrapperArray array: "Fail" | ||
|
||
suiteend | ||
|
||
suitedef simpleComparationTests with | ||
|
||
-- This should succeed | ||
test createByteArrayFromStringTest string: "Test" = "Test" | ||
-- This should fail | ||
test createByteArrayFromStringTest string: "Test" = "Fail" | ||
|
||
-- This should succeed | ||
test createByteWrapperArrayFromStringTest string: "Test" = "Test" | ||
-- This should fail | ||
test createByteWrapperArrayFromStringTest string: "Fail" = "Test" | ||
|
||
suiteend | ||
|
||
suitedef containerConversionTests with | ||
|
||
-- This should succeed | ||
test testContainer container: { | ||
array: "Test" | ||
} | ||
-- This should fail | ||
test testContainer container: { | ||
array: "Fail" | ||
} | ||
|
||
-- This should succeed | ||
test testWrapperContainer container: { | ||
array: "Test" | ||
} | ||
-- This should fail | ||
test testWrapperContainer container: { | ||
array: "Fail" | ||
} | ||
|
||
suiteend | ||
|
||
packageend |
73 changes: 73 additions & 0 deletions
73
...y.tests/junit/de/gebit/integrity/tests/junit/basic/bytearray/ByteArrayConversionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2013 Rene Schneider, GEBIT Solutions GmbH and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*******************************************************************************/ | ||
package de.gebit.integrity.tests.junit.basic.bytearray; | ||
|
||
import java.io.IOException; | ||
|
||
import org.jdom.Document; | ||
import org.jdom.JDOMException; | ||
import org.junit.Test; | ||
|
||
import de.gebit.integrity.runner.exceptions.ModelLoadException; | ||
import de.gebit.integrity.tests.junit.IntegrityJUnitTest; | ||
|
||
/** | ||
* JUnit test which checks bean calls. | ||
* | ||
* | ||
* @author Rene Schneider - initial API and implementation | ||
* | ||
*/ | ||
public class ByteArrayConversionTest extends IntegrityJUnitTest { | ||
|
||
/** | ||
* Performs a suite which does fixture calls with bean values and checks the resulting XML document. | ||
* | ||
* @throws ModelLoadException | ||
* @throws IOException | ||
* @throws JDOMException | ||
*/ | ||
@Test | ||
public void simpleConversionTests() throws ModelLoadException, IOException, JDOMException { | ||
Document tempResult = executeIntegritySuite( | ||
new String[] { "integrity/suites/basic/bytearray/byteArrayConversionTest.integrity" }, | ||
"integrity.basic.bytearray.simpleConversionTests", null); | ||
assertDocumentMatchesReference(tempResult); | ||
} | ||
|
||
/** | ||
* Performs a suite which does fixture calls with bean values and checks the resulting XML document. | ||
* | ||
* @throws ModelLoadException | ||
* @throws IOException | ||
* @throws JDOMException | ||
*/ | ||
@Test | ||
public void simpleComparationTests() throws ModelLoadException, IOException, JDOMException { | ||
Document tempResult = executeIntegritySuite( | ||
new String[] { "integrity/suites/basic/bytearray/byteArrayConversionTest.integrity" }, | ||
"integrity.basic.bytearray.simpleComparationTests", null); | ||
assertDocumentMatchesReference(tempResult); | ||
} | ||
|
||
/** | ||
* Performs a suite which does fixture calls with bean values and checks the resulting XML document. | ||
* | ||
* @throws ModelLoadException | ||
* @throws IOException | ||
* @throws JDOMException | ||
*/ | ||
@Test | ||
public void containerConversionTests() throws ModelLoadException, IOException, JDOMException { | ||
Document tempResult = executeIntegritySuite( | ||
new String[] { "integrity/suites/basic/bytearray/byteArrayConversionTest.integrity" }, | ||
"integrity.basic.bytearray.containerConversionTests", null); | ||
assertDocumentMatchesReference(tempResult); | ||
} | ||
|
||
} |
Oops, something went wrong.