1
1
/*
2
- * Copyright (c) 2019, 2021 Oracle and/or its affiliates.
2
+ * Copyright (c) 2019, 2022 Oracle and/or its affiliates.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
18
18
19
19
import org .junit .jupiter .api .Test ;
20
20
21
- import static org .junit .jupiter .api .Assertions .assertEquals ;
22
- import static org .junit .jupiter .api .Assertions .assertFalse ;
21
+ import static org .hamcrest .CoreMatchers .is ;
23
22
import static org .junit .jupiter .api .Assertions .assertThrows ;
23
+ import static org .hamcrest .MatcherAssert .assertThat ;
24
24
25
25
/**
26
26
* Unit tests for class {@link GenericTypeUtil}.
@@ -34,14 +34,14 @@ public class GenericTypeUtilTest{
34
34
public void testRawClass () {
35
35
Class <?> claszResult = GenericTypeUtil .rawClass (Object .class );
36
36
37
- assertFalse (claszResult .isInterface ());
38
- assertFalse (claszResult .isArray ());
39
- assertEquals ( "class java.lang.Object" , claszResult . toString ( ));
40
- assertEquals ( 1 , claszResult .getModifiers ());
41
- assertFalse (claszResult .isEnum ());
42
- assertFalse (claszResult .isSynthetic ());
43
- assertFalse (claszResult .isAnnotation ());
44
- assertFalse (claszResult .isPrimitive ());
37
+ assertThat (claszResult .isInterface (), is ( false ));
38
+ assertThat (claszResult .isArray (), is ( false ));
39
+ assertThat ( claszResult . toString (), is ( "class java.lang.Object" ));
40
+ assertThat ( claszResult .getModifiers (), is ( 1 ));
41
+ assertThat (claszResult .isEnum (), is ( false ));
42
+ assertThat (claszResult .isSynthetic (), is ( false ));
43
+ assertThat (claszResult .isAnnotation (), is ( false ));
44
+ assertThat (claszResult .isPrimitive (), is ( false ));
45
45
}
46
46
47
47
@ Test
0 commit comments