-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in addition to #1248.
- Loading branch information
Showing
5 changed files
with
134 additions
and
2 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
30 changes: 30 additions & 0 deletions
30
...g/src/test/java/org/citrusframework/integration/validation/UuidV4ValidationMatcherIT.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,30 @@ | ||
/* | ||
* Copyright the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.citrusframework.integration.validation; | ||
|
||
import org.citrusframework.annotations.CitrusTestSource; | ||
import org.citrusframework.common.TestLoader; | ||
import org.citrusframework.testng.spring.TestNGCitrusSpringSupport; | ||
import org.testng.annotations.Test; | ||
|
||
public class UuidV4ValidationMatcherIT extends TestNGCitrusSpringSupport { | ||
|
||
@Test | ||
@CitrusTestSource(type = TestLoader.SPRING) | ||
public void UuidV4ValidationMatcherIT() { | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
...c/test/resources/org/citrusframework/integration/validation/UuidV4ValidationMatcherIT.xml
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,70 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<spring:beans xmlns="http://www.citrusframework.org/schema/testcase" | ||
xmlns:spring="http://www.springframework.org/schema/beans" | ||
xmlns:http="http://www.citrusframework.org/schema/http/testcase" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.citrusframework.org/schema/testcase http://www.citrusframework.org/schema/testcase/citrus-testcase.xsd | ||
http://www.citrusframework.org/schema/http/testcase http://www.citrusframework.org/schema/http/testcase/citrus-http-testcase.xsd"> | ||
<testcase name="UuidV4ValidationMatcherIT"> | ||
<meta-info> | ||
<author>bbortt</author> | ||
<creationdate>2014-11-10</creationdate> | ||
<status>FINAL</status> | ||
<last-updated-by>bbortt</last-updated-by> | ||
<last-updated-on>2014-11-10T00:00:00</last-updated-on> | ||
</meta-info> | ||
|
||
<description> | ||
Tests the @isUUIDv4()@ validator | ||
</description> | ||
|
||
<variables> | ||
<variable name="validUuid" value="653ce6fd-dca4-4672-bbc0-16e2b74b8b81"/> | ||
<variable name="invalidUuid" value="019314e4-1eab-70a2-84cc-1b1328b36cdb"/> | ||
</variables> | ||
|
||
<actions> | ||
<send endpoint="helloEndpoint"> | ||
<message> | ||
<data>Hello Citrus!</data> | ||
</message> | ||
<header> | ||
<element name="message-id" value="${validUuid}"/> | ||
</header> | ||
</send> | ||
|
||
<receive endpoint="helloEndpoint"> | ||
<message type="plaintext"> | ||
<data>Hello Citrus!</data> | ||
</message> | ||
<header> | ||
<element name="message-id" value="@isUUIDv4()@"/> | ||
</header> | ||
</receive> | ||
|
||
<send endpoint="helloEndpoint"> | ||
<message> | ||
<data>Hello Citrus!</data> | ||
</message> | ||
<header> | ||
<element name="message-id" value="${invalidUuid}"/> | ||
</header> | ||
</send> | ||
|
||
<assert exception="org.citrusframework.exceptions.ValidationException" | ||
message="UuidV4ValidationMatcher failed for field 'message-id'. Received value '${invalidUuid}' is not a uuid v4."> | ||
<when> | ||
<receive endpoint="helloEndpoint"> | ||
<message type="plaintext"> | ||
<data>Hello Citrus!</data> | ||
</message> | ||
<header> | ||
<element name="message-id" value="@isUUIDv4()@"/> | ||
</header> | ||
</receive> | ||
</when> | ||
</assert> | ||
</actions> | ||
</testcase> | ||
</spring:beans> |
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