Skip to content

Commit

Permalink
Merge branch '2.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 28, 2024
2 parents 1b724e1 + e4df1bf commit 5c994f8
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ public void testDefaultUntouchables() throws Exception
JacksonYAMLProvider prov = new JacksonYAMLProvider();
// By default, no reason to exclude, say, this test class...
assertTrue(prov.isReadable(getClass(), getClass(),
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));
assertTrue(prov.isWriteable(getClass(), getClass(),
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));

// but some types should be ignored (set of ignorable may change over time tho!)
assertFalse(prov.isWriteable(StreamingOutput.class, StreamingOutput.class,
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));

// and then on-the-fence things (see [Issue-1])
assertFalse(prov.isReadable(String.class, getClass(),
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));
assertFalse(prov.isReadable(byte[].class, getClass(),
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));
}

public void testCustomUntouchables() throws Exception
Expand All @@ -62,15 +62,15 @@ public void testCustomUntouchables() throws Exception
prov.addUntouchable(getClass());
// and then it shouldn't be processable
assertFalse(prov.isReadable(getClass(), getClass(),
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));
assertFalse(prov.isWriteable(getClass(), getClass(),
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));

// Same for interfaces, like:
prov.addUntouchable(Collection.class);
assertFalse(prov.isReadable(ArrayList.class, ArrayList.class,
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));
assertFalse(prov.isWriteable(HashSet.class, HashSet.class,
new Annotation[0], null));
new Annotation[0], YAMLMediaTypes.APPLICATION_JACKSON_YAML_TYPE));
}
}

0 comments on commit 5c994f8

Please sign in to comment.