-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…Pair` use it
- Loading branch information
1 parent
04d6197
commit 62aa6a0
Showing
4 changed files
with
86 additions
and
102 deletions.
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
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
26 changes: 26 additions & 0 deletions
26
src/test/java/com/fasterxml/jackson/databind/PropertyNameTest.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,26 @@ | ||
package com.fasterxml.jackson.databind; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertSame; | ||
|
||
public class PropertyNameTest | ||
{ | ||
@Test | ||
public void testMerging() { | ||
PropertyName name1 = PropertyName.construct("name1", "ns1"); | ||
PropertyName name2 = PropertyName.construct("name2", "ns2"); | ||
PropertyName empty = PropertyName.construct("", null); | ||
PropertyName nsX = PropertyName.construct("", "nsX"); | ||
|
||
assertSame(name1, PropertyName.merge(name1, name2)); | ||
assertSame(name2, PropertyName.merge(name2, name1)); | ||
|
||
assertSame(name1, PropertyName.merge(name1, empty)); | ||
assertSame(name1, PropertyName.merge(empty, name1)); | ||
|
||
assertEquals(PropertyName.construct("name1", "nsX"), | ||
PropertyName.merge(nsX, name1)); | ||
} | ||
} |