コード例 #1
0
 @Test
 public void testUserStringStringString() {
   testUser = new User("username", "password", "usertype");
   if (testUser.getUsername() == "username"
       && testUser.getPassword() == "password"
       && testUser.getUsertype() == "usertype") {
     assertTrue(true);
   } else assertTrue(false);
 }
コード例 #2
0
 @Test
 public void testSetUsername() {
   assertEquals("Set Username is running", testusername, testUser.getUsername());
 }
コード例 #3
0
 @Test
 public void testGetUsername() {
   testUser.setUsername("testuser");
   assertEquals("Get Username is running", "testuser", testUser.getUsername());
 }