Skip to content

Commit

Permalink
Fix sonar findings
Browse files Browse the repository at this point in the history
  • Loading branch information
cuioss committed Aug 23, 2023
1 parent 8f4a38a commit fa1b5ea
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package de.cuioss.portal.core.cdi;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

Expand All @@ -25,16 +26,14 @@

class AnnotationInstanceProviderTest {

@SuppressWarnings({ "unlikely-arg-type", "java:S5785", "java:S5863" })
@Test
void shouldHandleHappyCase() {
var literal = AnnotationInstanceProvider.of(SuppressWarnings.class);
assertNotNull(literal.toString());
assertEquals(AnnotationInstanceProvider.of(SuppressWarnings.class), literal);
assertEquals(0, literal.hashCode());
assertEquals(literal, literal);
assertNotEquals(literal, AnnotationInstanceProvider.of(Deprecated.class));
assertNotEquals(SuppressWarnings.class, literal);
assertInstanceOf(Deprecated.class, AnnotationInstanceProvider.of(Deprecated.class));
assertInstanceOf(SuppressWarnings.class, AnnotationInstanceProvider.of(SuppressWarnings.class));
assertEquals(SuppressWarnings.class, literal.annotationType());
}

Expand Down

0 comments on commit fa1b5ea

Please sign in to comment.