Compare commits

..

6 commits

5 changed files with 36 additions and 21 deletions

View file

@ -1,3 +1,3 @@
# BAIS-CTX-1783821073-attempt-1 # BAIS-CTX-1783821073-attempt-4
Forge 이슈 작업 브랜치 `forge/BAIS-CTX-1783821073-attempt-1`. Forge 이슈 작업 브랜치 `forge/BAIS-CTX-1783821073-attempt-4`.

View file

@ -1,15 +1,22 @@
<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"> <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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.14</version> <version>3.5.14</version>
</parent> </parent>
<groupId>com.klaro.bais</groupId> <groupId>com.klaro.bais</groupId>
<artifactId>bais-platform</artifactId> <artifactId>bais-platform</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>services/payments</module> <module>services/payments</module>
</modules> </modules>
</project> </project>

View file

@ -1,11 +1,16 @@
<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"> <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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.klaro.bais</groupId> <groupId>com.klaro.bais</groupId>
<artifactId>bais-platform</artifactId> <artifactId>bais-platform</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<artifactId>payments</artifactId> <artifactId>payments</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
@ -13,5 +18,12 @@
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.18.0</version> <version>3.18.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>3.5.14</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

View file

@ -1,28 +1,24 @@
package com.klaro.bais.payments; package com.klaro.bais.payments;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertEquals;
class PaymentReferenceServiceTest { class PaymentReferenceServiceTest {
private final PaymentReferenceService paymentReferenceService = new PaymentReferenceService();
private final PaymentReferenceService service = new PaymentReferenceService();
@Test @Test
void testNormalize_NullInput() { void testNormalizeNull() {
assertEquals("", paymentReferenceService.normalize(null)); assertEquals("", service.normalize(null));
} }
@Test @Test
void testNormalize_EmptyInput() { void testNormalizeEmpty() {
assertEquals("", paymentReferenceService.normalize("")); assertEquals("", service.normalize(" "));
} }
@Test @Test
void testNormalize_WhitespaceInput() { void testNormalizeNormalString() {
assertEquals("", paymentReferenceService.normalize(" ")); assertEquals("test", service.normalize(" test "));
}
@Test
void testNormalize_RegularInput() {
assertEquals("Hello", paymentReferenceService.normalize(" Hello "));
} }
} }