Skip to content

Commit

Permalink
Update AccountAttributesTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyiwei authored Sep 6, 2023
1 parent 801afed commit 8c086e5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down Expand Up @@ -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());
}

Expand Down

0 comments on commit 8c086e5

Please sign in to comment.