Created
July 8, 2014 01:52
-
-
Save TrevorS/aed5f749eff4cc22671a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Example { | |
private Api api; | |
@BeforeClass | |
public static void setupApi() { | |
api = new Api(); | |
} | |
@Before | |
public static void createUsers() { | |
api.addUsers(getTestUsers()); | |
} | |
@Test | |
public void testAddUsers() { | |
response = api.AddUsers(getTestUsers()); | |
AssertTrue("test", response.isTest()); | |
} | |
@Test | |
public void testGetUsers() { | |
response = api.getUsers(); | |
AssertTrue(getTestUsers(), response.getUsers()); | |
} | |
@Test | |
public void testDeleteUsers() { | |
response = api.deleteUsers(); | |
AssertTrue(getTestUsers(), response.deleteUsers(getTestUsers)); | |
} | |
@Test | |
public void testDeleteAllUsers() { | |
response = api.deleteAllUsers(); | |
AssertTrue(getTestUsers(), response.deleteAllUsers()); | |
AssertTrue(0, response.listUsers().size()); | |
} | |
@AfterClass | |
public void cleanUpUsers() { | |
api.deleteAllUsers(); | |
} | |
private List<Users> getTestUsers() { | |
// make users | |
return new List<Users>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment