Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocnhan-tran1996 committed Dec 13, 2024
1 parent d0faa63 commit ece0590
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ void testSerialization() {
List<GrantedAuthority> authorities = AuthorityUtils.createAuthorityList("ROLE_USER");
WebAuthnAuthentication authentication = new WebAuthnAuthentication(userEntity, authorities);
byte[] serialize = SerializationUtils.serialize(authentication);
WebAuthnAuthentication deserializeAuthentication = (WebAuthnAuthentication) SerializationUtils.deserialize(serialize);
assertThat(deserializeAuthentication.getPrincipal().getName()).isEqualTo(authentication.getPrincipal().getName());
assertThat(deserializeAuthentication.getPrincipal().getDisplayName()).isEqualTo(authentication.getPrincipal().getDisplayName());
WebAuthnAuthentication deserializeAuthentication = (WebAuthnAuthentication) SerializationUtils
.deserialize(serialize);
assertThat(deserializeAuthentication.getPrincipal().getName())
.isEqualTo(authentication.getPrincipal().getName());
assertThat(deserializeAuthentication.getPrincipal().getDisplayName())
.isEqualTo(authentication.getPrincipal().getDisplayName());
assertThat(deserializeAuthentication.getPrincipal().getId()).isEqualTo(authentication.getPrincipal().getId());
}

Expand Down

0 comments on commit ece0590

Please sign in to comment.