assertThat(tester.getPage(), is(instanceOf(AdminPage.class)));
assertThat(tester.getActionMethodName(), is("create"));
assertThat(tester.isRedirect(), is(false));
assertThat(tester.getDestinationPath(), is("/index.jsp"));
Administrator admin =
Datastore.get(Administrator.class, UserService.createKey(UID));
assertThat(admin.getUid().getName(), is(UID));
assertThat(admin.getPassword(), is("password"));
assertThat(admin.getMail().getEmail(), is("tngasaw@nskint.co,jp"));
assertThat(admin.getName(), is("管理者"));
admin.setPassword("newpassword");
Datastore.put(admin);
// administrator登録済の場合
tester.start("/admin/create");
assertThat(tester.getPage(), is(instanceOf(AdminPage.class)));
assertThat(tester.getActionMethodName(), is("create"));
assertThat(tester.isRedirect(), is(false));
assertThat(tester.getDestinationPath(), is("/index.jsp"));
admin =
Datastore.get(Administrator.class, UserService.createKey(UID));
assertThat(admin.getUid().getName(), is(UID));
assertThat(admin.getPassword(), is("newpassword"));
assertThat(admin.getMail().getEmail(), is("tngasaw@nskint.co,jp"));
assertThat(admin.getName(), is("管理者"));
}