-
Notifications
You must be signed in to change notification settings - Fork 115
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
673fd45
commit 81105bd
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
json-unit-core/src/test/java/net/javacrumbs/jsonunit/core/internal/NodeTest.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,19 @@ | ||
package net.javacrumbs.jsonunit.core.internal; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.AbstractMap.SimpleEntry; | ||
import java.util.Map; | ||
|
||
import static java.math.BigDecimal.valueOf; | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class NodeTest { | ||
|
||
@Test | ||
@SuppressWarnings("unchecked") | ||
void shouldKeepOrder() { | ||
Node node = new Jackson2NodeFactory().convertToNode("{\"b\":1, \"a\": 2, \"c\": 3, \"d\": 4}", "test", false); | ||
assertThat(((Map<String, Object>) node.getValue()).entrySet().iterator().next()).isEqualTo(new SimpleEntry<>("b", valueOf(1))); | ||
} | ||
} |
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