@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());
  }
예제 #2
0
 @BeforeMethod
 protected void setUp(Method method) throws Exception {
   super.setUp(method);
   janvil = new Janvil(config);
 }