Ejemplo n.º 1
0
 @Before
 public void initiate() {
   PostControllerTestServiceApi postService =
       getPostServiceApi(admin.getUsername(), admin.getPassword());
   postService.deleteAll();
   if (userServiceApi.getUser(testUser0.getUsername()) == null) userServiceApi.signup(testUser0);
   if (userServiceApi.getUser(testUser1.getUsername()) == null) userServiceApi.signup(testUser1);
   FollowerControllerTestServiceApi followerService =
       getFollowerServiceApi(testUser0.getUsername(), testUser0.getPassword());
   followerService.add(testFollower1);
 }
Ejemplo n.º 2
0
  @After
  public void finish() {
    FollowerControllerTestServiceApi followerService =
        getFollowerServiceApi(testUser0.getUsername(), testUser0.getPassword());
    followerService.delete(testUser1.getUsername());
    userServiceApi.delete(testUser0.getUsername());
    userServiceApi.delete(testUser1.getUsername());

    PostControllerTestServiceApi postService =
        getPostServiceApi(admin.getUsername(), admin.getPassword());
    postService.deleteAll();
  }