Bael 4781: Introduction to ZeroCode (#10482)
* small example of hexagonal architecture in java * Bael-4781: Introduction to ZeroCode * add readme * Revert "small example of hexagonal architecture in java" This reverts commit c0f96441 * refactoring * refactoring
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.baeldung.zerocode.rest;
|
||||
|
||||
import org.jsmart.zerocode.core.domain.Scenario;
|
||||
import org.jsmart.zerocode.core.domain.TargetEnv;
|
||||
import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(ZeroCodeUnitRunner.class)
|
||||
@TargetEnv("rest_api.properties")
|
||||
public class UserEndpointIT {
|
||||
|
||||
@Test
|
||||
@Scenario("rest/user_create_test.json")
|
||||
public void test_user_creation_endpoint() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"scenarioName": "test user creation endpoint",
|
||||
"steps": [
|
||||
{
|
||||
"name": "test_successful_creation",
|
||||
"url": "/api/users",
|
||||
"method": "POST",
|
||||
"request": {
|
||||
"body": {
|
||||
"firstName": "John",
|
||||
"lastName": "Doe"
|
||||
}
|
||||
},
|
||||
"verify": {
|
||||
"status": 201,
|
||||
"body": {
|
||||
"id": "$NOT.NULL",
|
||||
"firstName": "John",
|
||||
"lastName": "Doe"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_firstname_validation",
|
||||
"url": "/api/users",
|
||||
"method": "POST",
|
||||
"request": {
|
||||
"body": {
|
||||
"firstName": "",
|
||||
"lastName": "Doe"
|
||||
}
|
||||
},
|
||||
"assertions": {
|
||||
"status": 400,
|
||||
"rawBody": "firstName can't be empty!"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
web.application.endpoint.host=http://localhost
|
||||
web.application.endpoint.port=8080
|
||||
web.application.endpoint.context=
|
||||
Reference in New Issue
Block a user