@GwtIncompatible // reflection public void testParse_useConstants() throws Exception { for (MediaType constant : getConstants()) { assertSame(constant, MediaType.parse(constant.toString())); } }
public void testWithoutParameters() { assertSame(MediaType.parse("image/gif"), MediaType.parse("image/gif").withoutParameters()); assertEquals( MediaType.parse("image/gif"), MediaType.parse("image/gif; foo=bar").withoutParameters()); }
@GwtIncompatible // reflection public void testCreate_useConstants() throws Exception { for (MediaType constant : getConstants()) { assertSame( constant, MediaType.create(constant.type(), constant.subtype()) .withParameters(constant.parameters())); } }
@GwtIncompatible // reflection public void testParse_useConstants() throws Exception { for (MediaType constant : getConstants()) { assertSame(constant, MediaType.parse(constant.toString())); } }
@GwtIncompatible // reflection public void testCreate_useConstants() throws Exception { for (MediaType constant : getConstants()) { assertSame(constant, MediaType.create(constant.type(), constant.subtype()) .withParameters(constant.parameters())); } }
public void testWithoutParameters() { assertSame(MediaType.parse("image/gif"), MediaType.parse("image/gif").withoutParameters()); assertEquals(MediaType.parse("image/gif"), MediaType.parse("image/gif; foo=bar").withoutParameters()); }