Files
backend/account-service/src/test/java/com/drinkool/entities/CustomerEntityTest.java
T
TakahashiNguyen fdcecf8368
Release package / release (push) Successful in 50m34s
fix: better url (#20)
Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #20
2026-04-12 14:27:37 +00:00

30 lines
740 B
Java

package com.drinkool.entities;
import static org.junit.jupiter.api.Assertions.*;
import com.drinkool.*;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.transaction.Transactional;
import org.junit.jupiter.api.*;
@QuarkusTest
public class CustomerEntityTest {
@Test
@Transactional
public void testSignupOneParamSuccess() {
CustomerEntity user = new CustomerEntity();
String phone = Utils.generateRandomPhone();
user.signup(phone);
assertNotNull(user.id, "ID not null after persist");
assertEquals(phone, user.name, "Tên mặc định phải là số điện thoại");
assertEquals(phone, user.phone);
assertNotNull(
user.hashedPassword,
"Password tự động phải được tạo và hash"
);
}
}