Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OutboundSseEventImpl.Builder should use MediaType.TEXT_PLAIN as defau…
…lt media type Signed-off-by: NicoNes <nicolas.nesmon@gmail.com>
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...axrs/src/main/java/org/jboss/resteasy/plugins/providers/sse/OutboundSseEventImplTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.jboss.resteasy.plugins.providers.sse; | ||
|
||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.sse.OutboundSseEvent; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/*** | ||
* | ||
* @author Nicolas NESMON | ||
* | ||
*/ | ||
public class OutboundSseEventImplTest { | ||
|
||
@Test | ||
public void Should_ReturnTextPlainMediaType_When_MediaTypeIsNotSet() throws Exception { | ||
OutboundSseEvent outboundSseEvent = new OutboundSseEventImpl.BuilderImpl().comment("comment").build(); | ||
Assert.assertEquals(MediaType.TEXT_PLAIN_TYPE, outboundSseEvent.getMediaType()); | ||
} | ||
|
||
} |