-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
152 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
SPCServer/springboot/src/main/resources/application-test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
server: | ||
port: 4000 | ||
|
||
api: | ||
prefix: /api/v1 | ||
|
||
spring: | ||
datasource: | ||
url: jdbc:h2:mem:testdb | ||
driver-class-name: org.h2.Driver | ||
username: sa | ||
password: password | ||
jpa: | ||
database-platform: org.hibernate.dialect.H2Dialect | ||
hibernate: | ||
ddl-auto: create-drop | ||
show-sql: true | ||
|
||
mail: | ||
host: smtp.gmail.com | ||
port: 587 | ||
username: ${MAIL_USERNAME} | ||
password: ${MAIL_PASSWORD} | ||
|
||
data: | ||
redis: | ||
#spring.data.redis.use-redis-cache | ||
use-redis-cache: false | ||
host: ${REDIS_HOST:localhost} # Default to 'localhost' if not provided | ||
port: ${REDIS_PORT:6379} # Default to 6379 if not provided | ||
|
||
alert: | ||
manager: | ||
emails: ${ALERT_MANAGER_EMAILS} | ||
|
||
jwt: | ||
expiration: ${JWT_EXPIRATION} | ||
expiration-refresh-token: ${JWT_EXPIRATION_REFRESH_TOKEN} | ||
secretKey: ${JWT_SECRET_KEY} | ||
|
||
logging: | ||
level: | ||
org.springframework: DEBUG | ||
springframework.security: DEBUG | ||
org.hibernate: DEBUG | ||
|
||
# swagger-ui custom path | ||
springdoc: | ||
swagger-ui: | ||
path: ${api.prefix}/swagger-ui.html | ||
enabled: true | ||
disable-swagger-default-url: true | ||
security: | ||
basic: | ||
enabled: true | ||
api-docs: | ||
path: ${api.prefix}/api-docs | ||
enabled: true | ||
show-actuator: true | ||
paths-to-match: ${api.prefix}/** | ||
|
||
#health check | ||
management: | ||
endpoints: | ||
web: | ||
base-path: /api/v1/actuator | ||
exposure: | ||
include: "health,info,prometheus" | ||
endpoint: | ||
health: | ||
show-details: always | ||
metrics: | ||
enabled: true | ||
prometheus: | ||
enabled: true | ||
|
||
vnpay: | ||
api: | ||
vnp_Version: ${VNPAY_VERSION} | ||
vnp_Command: ${VNPAY_COMMAND} | ||
vnp_OrderType: ${VNPAY_ORDER_TYPE} | ||
vnp_PayUrl: ${VNPAY_PAY_URL} | ||
vnp_Returnurl: ${VNPAY_RETURN_URL} | ||
vnp_TmnCode: ${VNPAY_TMN_CODE} | ||
vnp_HashSecret: ${VNPAY_HASH_SECRET} | ||
vnp_apiUrl: ${VNPAY_API_URL} |
61 changes: 61 additions & 0 deletions
61
SPCServer/springboot/src/test/java/com/lcaohoanq/shoppe/util/DTOConverterTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.lcaohoanq.shoppe.util; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.ActiveProfiles; | ||
|
||
@SpringBootTest | ||
@ActiveProfiles("test") | ||
class DTOConverterTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void toUserResponse() { | ||
} | ||
|
||
@Test | ||
void toCategoryResponse() { | ||
} | ||
|
||
@Test | ||
void toRoleResponse() { | ||
} | ||
|
||
@Test | ||
void toOrderResponse() { | ||
} | ||
|
||
@Test | ||
void toProductResponse() { | ||
} | ||
|
||
@Test | ||
void toProductImageResponse() { | ||
} | ||
|
||
@Test | ||
void toOrderDetailResponse() { | ||
} | ||
|
||
@Test | ||
void toCartResponse() { | ||
} | ||
|
||
@Test | ||
void toCartItemResponse() { | ||
} | ||
|
||
@Test | ||
void toWalletResponse() { | ||
} | ||
|
||
@Test | ||
void toWareHouseResponse() { | ||
} | ||
} |