-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: disable tests when network is unreachable - Added a condition checker to skip tests if the network is unreachable - Helps avoid failures when running behind a company proxy - support deactivation a container test by skip property * feat: add randomPattern and randomNumberGenerator function - Add min length feature to randomString * feat: add validation methods to SchemaValidator interface - Delegate applicability check to implementor - Added `canValidate(Message, boolean)` to check if a message can be validated based on schema validation settings. - Added `validate(Message, TestContext, String, String)` to perform validation against a specified schema repository and schema. Co-authored-by: Timon Borter <[email protected]> * feat: delegates validator requirement check to implementor Co-authored-by: Timon Borter <[email protected]> * feat: extract abstract BaseRepository Co-authored-by: Timon Borter <[email protected]> * feat: add support for validation of arrays in query parameters Co-authored-by: Timon Borter <[email protected]> * feat: add support for loaders that are capable to indicate that tests ought to be skipped Co-authored-by: Timon Borter <[email protected]> * feat: add string utils methods - hasNoText - isNotEmpty - appendSegmentToUrlPath - quote - trimTrailingComma - convertFirstChartToUpperCase - normalizeWhitespace Co-authored-by: Timon Borter <[email protected]> * fix: copy queryParams on copy constructor Co-authored-by: Timon Borter <[email protected]> * fix: allow lower case accept header name Co-authored-by: Timon Borter <[email protected]> * feat: add method to extract a query parameter map from HttpMessage Co-authored-by: Timon Borter <[email protected]> * feat: add support for subclassing Http ActionParser and Builders - To allow for subclassing in OpenAPI TestAPI Parsers and Builders Co-authored-by: Timon Borter <[email protected]> * chore: misc changes - Broaden scope of utility method - Add Reflection util method to copy fields between beans Co-authored-by: Timon Borter <[email protected]> * chore: comment suspicious code block --------- Co-authored-by: Thorsten Schlathoelter <[email protected]> Co-authored-by: Timon Borter <[email protected]>
- Loading branch information
1 parent
80a9fba
commit 84303ff
Showing
74 changed files
with
2,831 additions
and
852 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
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
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
47 changes: 47 additions & 0 deletions
47
core/citrus-api/src/test/java/org/citrusframework/util/ReflectionHelperTest.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,47 @@ | ||
package org.citrusframework.util; | ||
|
||
import org.testng.Assert; | ||
import org.testng.annotations.Test; | ||
|
||
public class ReflectionHelperTest { | ||
|
||
@Test | ||
public void copyFields() { | ||
SubClass source = new SubClass("John Doe", 30, "Super John", 60); | ||
|
||
SubClass target = new SubClass(null, 0, null, 0); | ||
|
||
ReflectionHelper.copyFields(SubClass.class, source, target); | ||
|
||
Assert.assertEquals(target.name, "John Doe"); | ||
Assert.assertEquals(target.age, 30); | ||
|
||
Assert.assertEquals(target.superName, "Super John"); | ||
Assert.assertEquals(target.superAge, 60); | ||
|
||
} | ||
|
||
private static class SuperClass { | ||
|
||
String superName; | ||
int superAge; | ||
|
||
public SuperClass(String superName, int superAge) { | ||
this.superName = superName; | ||
this.superAge = superAge; | ||
} | ||
} | ||
|
||
private static class SubClass extends SuperClass { | ||
|
||
String name; | ||
int age; | ||
|
||
public SubClass(String name, int age, String superName, int superAge) { | ||
super(superName, superAge); | ||
this.name = name; | ||
this.age = age; | ||
} | ||
} | ||
|
||
} |
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
Oops, something went wrong.