+ @DataProvider
+ public Object[][] mismatchingAnnotations()
+ {
+ return new Object[][] {
+ {
+ new Annotation("A", "aaa", 'A', 1f),
+ new Annotation("A", "aaa", 'B', 1f) },
+ { new Annotation(1f), new Annotation(2f) },
+ { new Annotation(1f), new Annotation("A", "", 'A', 1f) } };
+ }
+
+ @Test(groups = { "Functional" }, dataProvider = "mismatchingAnnotations")
+ public void testAnnotationsEqual_mismatchingAnnotations(Annotation first,
+ Annotation second)
+ {
+ assert !AnnotationsMatcher.annotationsEqual(first, second);
+ }
+
+ @Test(groups = { "Functional" })
+ public void testAnnotationsEqual_nullsMatch()
+ {
+ assert AnnotationsMatcher.annotationsEqual(null, null);
+ }
+
+ @Test(groups = { "Functional" })
+ public void testAnnotationsEqual_nullNotMatchEmpty()
+ {
+ assert !AnnotationsMatcher
+ .annotationsEqual(null, Annotation.EMPTY_ANNOTATION);
+ assert !AnnotationsMatcher
+ .annotationsEqual(Annotation.EMPTY_ANNOTATION, null);
+ }
+