-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove duplicate database schema entries
- Loading branch information
Showing
59 changed files
with
1,105 additions
and
574 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
simulator-docs/src/main/asciidoc/images/database-schema.plantuml
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,75 @@ | ||
@startuml | ||
|
||
!theme vibrant | ||
top to bottom direction | ||
skinparam linetype ortho | ||
|
||
class message { | ||
direction: integer | ||
created_date: timestamp(6) with time zone | ||
last_modified_date: timestamp(6) with time zone | ||
scenario_execution_execution_id: bigint | ||
citrus_message_id: varchar(255) | ||
payload: text | ||
message_id: bigint | ||
} | ||
class message_header { | ||
created_date: timestamp(6) with time zone | ||
last_modified_date: timestamp(6) with time zone | ||
message_id: bigint | ||
header_value: varchar(255) | ||
name: varchar(255) | ||
header_id: bigint | ||
} | ||
class scenario_action { | ||
end_date: timestamp(6) with time zone | ||
scenario_execution_execution_id: bigint | ||
start_date: timestamp(6) with time zone | ||
name: varchar(255) | ||
action_id: bigint | ||
} | ||
class scenario_execution { | ||
end_date: timestamp(6) with time zone | ||
start_date: timestamp(6) with time zone | ||
test_result_id: bigint | ||
scenario_name: varchar(255) | ||
execution_id: bigint | ||
} | ||
class scenario_parameter { | ||
control_type: integer | ||
required: boolean | ||
created_date: timestamp(6) with time zone | ||
last_modified_date: timestamp(6) with time zone | ||
scenario_execution_execution_id: bigint | ||
label: varchar(255) | ||
name: varchar(255) | ||
parameter_value: text | ||
parameter_id: bigint | ||
} | ||
class test_parameter { | ||
created_date: timestamp(6) with time zone | ||
last_modified_date: timestamp(6) with time zone | ||
parameter_value: varchar(255) | ||
test_result_id: bigint | ||
parameter_key: varchar(255) | ||
} | ||
class test_result { | ||
status: integer | ||
created_date: timestamp(6) with time zone | ||
last_modified_date: timestamp(6) with time zone | ||
class_name: varchar(255) | ||
failure_type: varchar(255) | ||
test_name: varchar(255) | ||
error_message: text | ||
stack_trace: text | ||
id: bigint | ||
} | ||
|
||
message -[#595959,plain]-^ scenario_execution : "scenario_execution_execution_id:execution_id" | ||
message_header -[#595959,plain]-^ message : "message_id" | ||
scenario_action -[#595959,plain]-^ scenario_execution : "scenario_execution_execution_id:execution_id" | ||
scenario_execution -[#595959,plain]-^ test_result : "test_result_id:id" | ||
scenario_parameter -[#595959,plain]-^ scenario_execution : "scenario_execution_execution_id:execution_id" | ||
test_parameter -[#595959,plain]-^ test_result : "test_result_id:id" | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
51 changes: 51 additions & 0 deletions
51
...sample-rest/src/main/java/org/citrusframework/simulator/sample/scenario/FailScenario.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,51 @@ | ||
/* | ||
* Copyright 2006-2017 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.simulator.sample.scenario; | ||
|
||
import static org.citrusframework.actions.EchoAction.Builder.echo; | ||
import static org.citrusframework.actions.FailAction.Builder.fail; | ||
import static org.citrusframework.dsl.MessageSupport.MessageBodySupport.fromBody; | ||
|
||
import org.citrusframework.simulator.scenario.AbstractSimulatorScenario; | ||
import org.citrusframework.simulator.scenario.Scenario; | ||
import org.citrusframework.simulator.scenario.ScenarioRunner; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
|
||
/** | ||
* @author Christoph Deppisch | ||
*/ | ||
@Scenario("Fail") | ||
@RequestMapping(value = "/services/rest/simulator/fail", method = RequestMethod.POST) | ||
public class FailScenario extends AbstractSimulatorScenario { | ||
|
||
@Override | ||
public void run(ScenarioRunner scenario) { | ||
scenario.$(scenario.http() | ||
.receive() | ||
.post() | ||
.message() | ||
.body("<Failure xmlns=\"http://citrusframework.org/schemas/failure\">" + | ||
"Fail!" + | ||
"</Failure>")); | ||
|
||
scenario.$(echo("Careful - I am gonna fail successfully (:")); | ||
|
||
scenario.$(fail("It is the courage to continue that counts.")); | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
simulator-samples/sample-rest/src/main/resources/xsd/FailureService.xsd
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,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2006-2017 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. | ||
--> | ||
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns="http://citrusframework.org/schemas/failure" | ||
targetNamespace="http://citrusframework.org/schemas/failure" | ||
elementFormDefault="qualified"> | ||
|
||
<xs:element name="Failure" type="xs:string"/> | ||
</xs:schema> |
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
Oops, something went wrong.