Ejemplo n.º 1
0
  @Before
  public void init() throws Exception {
    server.start();
    baseURL = new URL("http", "localhost", server.getHttpPort(), "/");

    ObmDomain domain = ObmDomain.builder().name("test.tlse.lng").id(2).build();
    UserLogin login = UserLogin.valueOf("user-with-books");
    ObmHost mailHost = ObmHost.builder().id(1).build();
    UserEmails emails =
        UserEmails.builder()
            .domain(domain)
            .addAddress(login.getStringValue())
            .server(mailHost)
            .build();
    obmUser =
        userDao.create(
            ObmUser.builder()
                .login(login)
                .emails(emails)
                .domain(domain)
                .extId(UserExtId.valueOf("extId123"))
                .build());
    token = new AccessToken(obmUser.getUid(), "papi");
    token.setDomain(domain);
  }
Ejemplo n.º 2
0
 @Test
 public void startingShouldWorkWhenH2() throws Exception {
   server.start();
   assertThat(server.isStarted()).isTrue();
 }