Compare commits
No commits in common. "main" and "forge/BAIS-E2E-ANA-001-attempt-1" have entirely different histories.
main
...
forge/BAIS
8 changed files with 1 additions and 112 deletions
|
|
@ -1,3 +0,0 @@
|
|||
# BAIS-NATIVE-1783698057-attempt-1
|
||||
|
||||
Forge 이슈 작업 브랜치 `forge/BAIS-NATIVE-1783698057-attempt-1`.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# BAIS-SOURCE-1783702539-attempt-1
|
||||
|
||||
Forge 이슈 작업 브랜치 `forge/BAIS-SOURCE-1783702539-attempt-1`.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
name: ci
|
||||
on: [pull_request]
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
40
pom.xml
40
pom.xml
|
|
@ -1,40 +0,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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>bais-gate-e2e</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package com.example.baisgate;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class BaisGateApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BaisGateApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
package com.example.baisgate;
|
||||
|
||||
public class PaymentService {
|
||||
public String approve(String transactionId) {
|
||||
if (transactionId == null || transactionId.trim().isEmpty()) {
|
||||
throw new IllegalArgumentException("Transaction ID cannot be blank");
|
||||
}
|
||||
return "APPROVED:" + transactionId;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
package com.example.baisgate;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class BaisGateApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
package com.example.baisgate;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class PaymentServiceTest {
|
||||
|
||||
@Test
|
||||
void testApprove_WithValidTransactionId_ReturnsApproved() {
|
||||
PaymentService paymentService = new PaymentService();
|
||||
String result = paymentService.approve("12345");
|
||||
assertEquals("APPROVED:12345", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testApprove_WithBlankTransactionId_ThrowsIllegalArgumentException() {
|
||||
PaymentService paymentService = new PaymentService();
|
||||
Exception exception = assertThrows(IllegalArgumentException.class, () -> {
|
||||
paymentService.approve("");
|
||||
});
|
||||
assertEquals("Transaction ID cannot be blank", exception.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testApprove_WithNullTransactionId_ThrowsIllegalArgumentException() {
|
||||
PaymentService paymentService = new PaymentService();
|
||||
Exception exception = assertThrows(IllegalArgumentException.class, () -> {
|
||||
paymentService.approve(null);
|
||||
});
|
||||
assertEquals("Transaction ID cannot be blank", exception.getMessage());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue