Compare commits
5 commits
main
...
forge/iss-
| Author | SHA1 | Date | |
|---|---|---|---|
| 67d244255c | |||
| a4bc99c381 | |||
| 7d60985dc8 | |||
| f6bac2803a | |||
| 6c4d57b325 |
5 changed files with 77 additions and 0 deletions
3
.forge/iss-cb58f86e71d9-attempt-1.md
Normal file
3
.forge/iss-cb58f86e71d9-attempt-1.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# iss-cb58f86e71d9-attempt-1
|
||||||
|
|
||||||
|
Forge 이슈 작업 브랜치 `forge/iss-cb58f86e71d9-attempt-1`.
|
||||||
18
pom.xml
Normal file
18
pom.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<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.klaro.bais</groupId>
|
||||||
|
<artifactId>bais-platform</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>3.5.14</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>services/payments</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
||||||
21
services/payments/pom.xml
Normal file
21
services/payments/pom.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.klaro.bais</groupId>
|
||||||
|
<artifactId>bais-platform</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>payments</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.18.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.klaro.bais.payments;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
public class PaymentReferenceService {
|
||||||
|
|
||||||
|
public String normalize(String input) {
|
||||||
|
return StringUtils.trimToEmpty(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.klaro.bais.payments;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
class PaymentReferenceServiceTest {
|
||||||
|
|
||||||
|
private PaymentReferenceService paymentReferenceService = new PaymentReferenceService();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testNormalizeWithNull() {
|
||||||
|
assertEquals("", paymentReferenceService.normalize(null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testNormalizeWithBlank() {
|
||||||
|
assertEquals("", paymentReferenceService.normalize(" "));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testNormalizeWithValidString() {
|
||||||
|
String input = " test ";
|
||||||
|
assertEquals("test", paymentReferenceService.normalize(input));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue