コード例 #1
0
  @After
  public void tearDown() throws Exception {
    super.tearDown();

    usersDataService.deleteAll();
    rolesDataService.deleteAll();

    clearSecurityContext();
  }
コード例 #2
0
  @Before
  @Override
  public void setUp() throws Exception {
    super.setUp();

    passwordEncoder = getFromContext(MotechPasswordEncoder.class);

    usersDataService.deleteAll();
    rolesDataService.deleteAll();

    // authorize
    motechUserService.registerMotechAdmin("admin", "admin", "*****@*****.**", Locale.ENGLISH);

    setUpSecurityContext("admin", "admin", getPermissions());
  }