Skip to content

Commit

Permalink
inverted SkipDefaults expected test results
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoldberg committed Oct 19, 2015
1 parent 0a76efc commit 3ea31fd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AnnotationAppenderValueFilterSkipDefaultsTest {

@Test
public void testFilteringNoDefault() throws Exception {
assertThat(AnnotationAppender.ValueFilter.SkipDefaults.INSTANCE.isRelevant(annotationDescription, methodDescription), is(false));
assertThat(AnnotationAppender.ValueFilter.SkipDefaults.INSTANCE.isRelevant(annotationDescription, methodDescription), is(true));
verifyZeroInteractions(annotationDescription);
verify(methodDescription).getDefaultValue();
verifyNoMoreInteractions(methodDescription);
Expand All @@ -36,7 +36,7 @@ public void testFilteringNoDefault() throws Exception {
public void testFilteringNoEquality() throws Exception {
when(methodDescription.getDefaultValue()).thenReturn(new Object());
when(annotationDescription.getValue(methodDescription)).thenReturn(new Object());
assertThat(AnnotationAppender.ValueFilter.SkipDefaults.INSTANCE.isRelevant(annotationDescription, methodDescription), is(false));
assertThat(AnnotationAppender.ValueFilter.SkipDefaults.INSTANCE.isRelevant(annotationDescription, methodDescription), is(true));
verify(annotationDescription).getValue(methodDescription);
verifyNoMoreInteractions(annotationDescription);
verify(methodDescription).getDefaultValue();
Expand All @@ -48,7 +48,7 @@ public void testFilteringEquality() throws Exception {
Object value = new Object();
when(methodDescription.getDefaultValue()).thenReturn(value);
when(annotationDescription.getValue(methodDescription)).thenReturn(value);
assertThat(AnnotationAppender.ValueFilter.SkipDefaults.INSTANCE.isRelevant(annotationDescription, methodDescription), is(true));
assertThat(AnnotationAppender.ValueFilter.SkipDefaults.INSTANCE.isRelevant(annotationDescription, methodDescription), is(false));
verify(annotationDescription).getValue(methodDescription);
verifyNoMoreInteractions(annotationDescription);
verify(methodDescription).getDefaultValue();
Expand All @@ -59,4 +59,4 @@ public void testFilteringEquality() throws Exception {
public void testObjectProperties() throws Exception {
ObjectPropertyAssertion.of(AnnotationAppender.ValueFilter.SkipDefaults.class).apply();
}
}
}

0 comments on commit 3ea31fd

Please sign in to comment.