progressing
This commit is contained in:
@ -3,28 +3,24 @@ package de.jottyfan.camporganizer.module.registration;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.keycloak.admin.client.resource.UsersResource;
|
||||
import org.keycloak.representations.idm.UserRepresentation;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class TestKeycloakRepository {
|
||||
|
||||
@Autowired
|
||||
private KeycloakRepository repository;
|
||||
|
||||
/**
|
||||
* test registration
|
||||
*/
|
||||
@Test
|
||||
public void testRegister() {
|
||||
assertTrue(repository.register("Hans", "Dampf", "jottyfan@mail.de"));
|
||||
KeycloakRepository repository = new KeycloakRepository();
|
||||
UserRepresentation user = repository.getUserRepresentation("Hans", "Dampf", "hans@dampf.org");
|
||||
UsersResource resource = repository.getUsersResource("http://localhost:8080", "ow", "admin", "password", "biblecamp");
|
||||
assertTrue(repository.register(resource, user));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user