-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
54 additions
and
71 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
16 changes: 8 additions & 8 deletions
16
src/test/java/com/mvcguru/risiko/maven/eclipse/UserTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
package com.mvcguru.risiko.maven.eclipse; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.junit.jupiter.api.*; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class UserTest { | ||
|
||
@Test | ||
public void testUser() { | ||
String username = "Bobby"; | ||
String password = "bobbybobby"; | ||
String username = "bobby"; | ||
String password = "bobbybobby00"; | ||
|
||
User user = new User(username, password); | ||
|
||
Assert.assertEquals("Username should be equal to the one set", username, user.getUsername()); | ||
Assert.assertEquals("Password should be equal to the one set", password, user.getPassword()); | ||
assertEquals(username, user.getUsername(), "Username should be equal to the one set"); | ||
assertEquals(password, user.getPassword(), "Password should be equal to the one set"); | ||
|
||
String newUsername = "newTestUser"; | ||
String newPassword = "newTestPassword"; | ||
|
||
user.setUsername(newUsername); | ||
user.setPassword(newPassword); | ||
|
||
Assert.assertEquals("Username should be updated to the new one", newUsername, user.getUsername()); | ||
Assert.assertEquals("Password should be updated to the new one", newPassword, user.getPassword()); | ||
assertEquals(newUsername, user.getUsername(), "Username should be updated to the new one"); | ||
assertEquals(newPassword, user.getPassword(), "Password should be updated to the new one"); | ||
} | ||
} |