-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
1 changed file
with
4 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,13 +48,14 @@ public void testGetInvalidStateInfo() throws Exception { | |
public void testToEntity() { | ||
AccountAttributes account = createValidAccountAttributesObject(); | ||
Account expectedAccount = new Account(account.getGoogleId(), account.getName(), | ||
account.getEmail(), account.getReadNotifications()); | ||
account.getEmail(), account.getDescription(), account.getReadNotifications()); | ||
|
||
Account actualAccount = account.toEntity(); | ||
|
||
assertEquals(expectedAccount.getGoogleId(), actualAccount.getGoogleId()); | ||
assertEquals(expectedAccount.getName(), actualAccount.getName()); | ||
assertEquals(expectedAccount.getEmail(), actualAccount.getEmail()); | ||
assertEquals(expectedAccount.getDescription(), actualAccount.getDescription()); | ||
assertEquals(expectedAccount.getReadNotifications(), actualAccount.getReadNotifications()); | ||
} | ||
|
||
|
@@ -134,13 +135,14 @@ public void testBuilder_withNullArguments_shouldThrowException() { | |
|
||
@Test | ||
public void testValueOf() { | ||
Account genericAccount = new Account("id", "Joe", "[email protected]", new HashMap<>()); | ||
Account genericAccount = new Account("id", "Joe", "[email protected]", "A software engineering student.", new HashMap<>()); | ||
|
||
AccountAttributes observedAccountAttributes = AccountAttributes.valueOf(genericAccount); | ||
|
||
assertEquals(genericAccount.getGoogleId(), observedAccountAttributes.getGoogleId()); | ||
assertEquals(genericAccount.getName(), observedAccountAttributes.getName()); | ||
assertEquals(genericAccount.getEmail(), observedAccountAttributes.getEmail()); | ||
assertEquals(genericAccount.getDescription(), observedAccountAttributes.getDescription()); | ||
assertEquals(genericAccount.getCreatedAt(), observedAccountAttributes.getCreatedAt()); | ||
} | ||
|
||
|