Skip to content

Commit

Permalink
[RESTEASY-1730]:Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jimma authored and asoldano committed Jan 15, 2018
1 parent 8970af3 commit c4b4cc9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jboss.resteasy.test.providers;

import org.jboss.resteasy.plugins.providers.DefaultTextPlain;
import org.jboss.resteasy.plugins.providers.DefaultBooleanWriter;
import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.jboss.resteasy.test.providers.resource.ProviderFactoryPrecedenceBase;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void testMatching2() {

MessageBodyWriter<Boolean> writer = factory.getMessageBodyWriter(Boolean.class, null, null, new MediaType("text", "plain"));
Assert.assertNotNull("No writer exists for the given media type", writer);
Assert.assertEquals("The type of the writer is incorrect", writer.getClass(), DefaultTextPlain.class);
Assert.assertEquals("The type of the writer is incorrect", writer.getClass(), DefaultBooleanWriter.class);
}

/**
Expand Down Expand Up @@ -128,7 +128,7 @@ public void testUserPrecendence3() throws Exception {
}

private void verifyPlainWriter(ResteasyProviderFactory factory) {
MessageBodyWriter writer2 = factory.getMessageBodyWriter(Boolean.class, null, null, MediaType.TEXT_PLAIN_TYPE);
MessageBodyWriter writer2 = factory.getMessageBodyWriter(Character.class, null, null, MediaType.TEXT_PLAIN_TYPE);
Assert.assertNotNull("No writer exists for the given media type", writer2);
Assert.assertTrue("The type of the writer is incorrect", writer2 instanceof ProviderFactoryPrecendencePlainTextWriter);
}
Expand Down

0 comments on commit c4b4cc9

Please sign in to comment.