Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 121 additions & 96 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,96 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.medeiros</groupId>
<artifactId>SPRINGProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>SPRINGProject</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>20</java.version>
<!-- ... -->
<spring-security.version>6.0.3</spring-security.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>3.0.6</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
</dependency>



<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-core -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>6.0.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-orgjson -->

<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-impl -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>


</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.6</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>com.medeiros</groupId>
<artifactId>SPRINGProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>SPRINGProject</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>20</java.version>
<!-- ... -->
<spring-security.version>6.0.3</spring-security.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-core</artifactId>
<version>1.4.1</version>
<!--Dependency added by RoostGPT-->
</dependency>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-debugserver</artifactId>
<version>0.1.0</version>
<!--Dependency added by RoostGPT-->
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>1.4.1</version>
<scope>test</scope>
<!--Dependency added by RoostGPT-->
</dependency>
<dependency>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-formatter</artifactId>
<version>0.0.40</version>
<!--Dependency added by RoostGPT-->
</dependency>
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-core -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>6.0.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-orgjson -->
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-impl -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>0.0.40</version>
<!--Plugin added by RoostGPT-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<!--Plugin added by RoostGPT-->
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ********RoostGPT********

# Test generated by RoostGPT for test IntegrationTest using AI Type and AI Model
#
# ROOST_METHOD_HASH=d4875ba7c9
# ROOST_METHOD_SIG_HASH=deac2363dc
#
# ########## Scenario ##########
#
# {
# feature: 'Feature: Credential Wallet API\r\n' +
# ' As a user of the Credential Wallet API\r\n' +
# ' I want to get registration details of people allowed to receive credentials \r\n' +
# ' So that I can manage my account effectively',
# background: 'Background:\r\n Given the base URL is "http://localhost:8080"',
# rule: null,
# scenario: {
# title: 'Scenario: Get Registration Details Of Recipient Person',
# steps: 'Given id of recipient as 27364922937 in path parameter\r\n' +
# 'And size=13 and offset=42 in request query\r\n' +
# 'When the client sends a GET request to endpoint "/recipients/persons/{id}/registrations" \r\n' +
# 'When authentication token is sent in request\r\n' +
# 'Then for successful request having status code 200, Verify that headers have api-version, page-size and page-offset\r\n' +
# 'And response body must have element registrations and total.',
# examples: ''
# }
# }
#

# ********RoostGPT********
Feature: Credential Wallet API
As a user of the Credential Wallet API
I want to get registration details of people allowed to receive credentials
So that I can manage my account effectively

Background:
* url 'http://localhost:8080'

Scenario: Get Registration Details Of Recipient Person
* header Authorization = 'CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN'
Given path '/recipients/persons/27364922937/registrations'
And param size = 13
And param offset = 42
When method get
Then status 200
And match header.api-version == '1.0.0'
And match header['page-size'] == '13'
And match header['page-offset'] == '42'
And match response contains
"""
{
registrations: '#array',
total: '#number'
}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ********RoostGPT********

# Test generated by RoostGPT for test IntegrationTest using AI Type and AI Model
#
# ROOST_METHOD_HASH=f93f9c01c9
# ROOST_METHOD_SIG_HASH=66e25557dd
#
# ########## Scenario ##########
#
# {
# feature: 'Feature: Credential Wallet API\r\n' +
# ' As a user of the Credential Wallet API\r\n' +
# ' I want to get registration details of people allowed to receive credentials \r\n' +
# ' So that I can manage my account effectively',
# background: 'Background:\r\n Given the base URL is "http://localhost:8080"',
# rule: null,
# scenario: {
# title: 'Scenario: Request must fail with error if request not authenticated',
# steps: 'Given id of recipient as 09237482347 in path parameter\r\n' +
# 'And size=43 and offset=22 in request query\r\n' +
# 'When the client sends a GET request to endpoint "/recipients/persons/{id}/registrations" \r\n' +
# 'When authentication token is not sent in request\r\n' +
# 'Then for unauthenticated request having status code 401, Verify that headers have api-version\r\n' +
# 'And response body must have appropriate error schema',
# examples: ''
# }
# }
#

# ********RoostGPT********
Feature: Credential Wallet API
As a user of the Credential Wallet API
I want to get registration details of people allowed to receive credentials
So that I can manage my account effectively

Background:
* def CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_URL = karate.properties['CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_URL'] || karate.get('CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_URL', 'http://localhost:4010')
* def CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN = karate.properties['CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN'] || karate.get('CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN', 'Bearer_Dummy_Token')

Scenario: Request must fail with error if request not authenticated
* url CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_URL
And path '/recipients/persons/{id}/registrations'
And param id = '09237482347'
And param size = 43
And param offset = 22
When method get
Then status 401
And match responseHeaders['api-version'] == '1.0.0'
And match response ==
"""
{
error: '#string',
description: '#string'
}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

package com.medeiros.api_tests;

import com.intuit.karate.Results;
import com.intuit.karate.Runner;
// import com.intuit.karate.http.HttpServer;
// import com.intuit.karate.http.ServerConfig;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

class RoostIoCredentialWalletApiMainApiCredentialregisterWallet100ResolvedTest {

@Test
void testAll() {
String credentialregister_wallet_1_0_0_resolved_88376fefa0_url = System.getenv().getOrDefault("CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_URL", "http://127.0.0.1:4010");
String credentialregister_wallet_1_0_0_resolved_88376fefa0_auth_token = System.getenv().getOrDefault("CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN", "dummy_CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN");
Results results = Runner.path("src/test/java/com/medeiros/api_tests/RoostIoCredentialWalletApiMainApiCredentialregisterWallet100Resolved")
.systemProperty("CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_URL",credentialregister_wallet_1_0_0_resolved_88376fefa0_url)
.systemProperty("CREDENTIALREGISTER_WALLET_1_0_0_RESOLVED_88376FEFA0_AUTH_TOKEN", credentialregister_wallet_1_0_0_resolved_88376fefa0_auth_token)
.reportDir("testReport").parallel(1);
assertEquals(0, results.getFailCount(), results.getErrorMessages());
}

}