BAIS 권한 서비스를 Spring Java로 전환 #2

Open
forge-bot wants to merge 4 commits from forge/BAIS-E2E-MIG-001-attempt-1 into main
Showing only changes of commit bccaa2f4f1 - Show all commits

View file

@ -0,0 +1,17 @@
package com.example.authorization;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AuthorizationServiceTest {
private final AuthorizationService authorizationService = new AuthorizationService();
@Test
void testHasAccess() {
assertTrue(authorizationService.hasAccess("ADMIN", "RESOURCE"));
assertTrue(authorizationService.hasAccess("USER", "RESOURCE"));
assertFalse(authorizationService.hasAccess("USER", "OTHER_RESOURCE"));
assertFalse(authorizationService.hasAccess("GUEST", "RESOURCE"));
}
}