Skip to content

Commit

Permalink
handle unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Oct 11, 2024
1 parent f626d4d commit 39eaa58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.Collections;
import java.util.Map;
import java.util.Objects;

import javax.annotation.Nullable;

Expand All @@ -40,4 +41,17 @@ private Extensions(@Nullable Map<String, ?> extensions) {
public Map<String, ?> getExtensions() {
return extensions;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Extensions that = (Extensions) o;
return Objects.equals(extensions, that.extensions);
}

@Override
public int hashCode() {
return Objects.hashCode(extensions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ private void compareCreationOptions(PublicKeyCredentialCreationOptions a, Public
compareDescriptorLists(a.getExcludeCredentials(), b.getExcludeCredentials());
Assert.assertEquals(a.getAuthenticatorSelection(), b.getAuthenticatorSelection());
Assert.assertEquals(a.getAttestation(), b.getAttestation());

Assert.assertNull(a.getExtensions());
Assert.assertNull(b.getExtensions());
}

void testCreationOptions(@Nullable Long timeout) {
Expand Down

0 comments on commit 39eaa58

Please sign in to comment.