BAIS 권한 서비스를 Spring Java로 전환 #1
1 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
package com.example.authorization;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class AuthorizationServiceTest {
|
||||
|
||||
@Test
|
||||
void testHasAccess() {
|
||||
AuthorizationService service = new AuthorizationService();
|
||||
assertTrue(service.hasAccess("ADMIN", "someResource"));
|
||||
assertFalse(service.hasAccess("USER", "someResource"));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue