-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42a677c
commit 5fc53a9
Showing
3 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
26 changes: 21 additions & 5 deletions
26
core/src/test/java/com/predic8/membrane/core/openapi/model/MessageTest.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 |
---|---|---|
@@ -1,16 +1,32 @@ | ||
package com.predic8.membrane.core.openapi.model; | ||
|
||
import org.junit.jupiter.api.*; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import javax.validation.constraints.AssertTrue; | ||
import java.net.URISyntaxException; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
class MessageTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
@Test | ||
void starStarTest() throws URISyntaxException { | ||
Request request = Request.post().json().path("/star-star").body("{}"); | ||
assertTrue(request.isOfMediaType("*/*")); | ||
} | ||
|
||
@Test | ||
void typeStarTest() throws URISyntaxException { | ||
Request request = Request.post().json().path("/star-star").body("{}"); | ||
assertTrue(request.isOfMediaType("application/*")); | ||
} | ||
|
||
@Test | ||
void isOfMediaType() { | ||
void starTypeTest() throws URISyntaxException { | ||
Request request = Request.post().json().path("/star-star").body("{}"); | ||
assertFalse(request.isOfMediaType("*/json")); | ||
} | ||
} |
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
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