コード例 #1
0
ファイル: OptionsTest.java プロジェクト: dreamsxin/wire
 @Test
 public void resolveFieldPathDoesntMatch() throws Exception {
   assertThat(Options.resolveFieldPath("a.b", set("c", "d"))).isNull();
 }
コード例 #2
0
ファイル: OptionsTest.java プロジェクト: dreamsxin/wire
 @Test
 public void resolveFieldPathMatchesAllSegments() throws Exception {
   assertThat(asList(Options.resolveFieldPath("a.b.c.d", set("a.b.c.d", "z.b.c.d"))))
       .containsExactly("a.b.c.d");
 }
コード例 #3
0
ファイル: OptionsTest.java プロジェクト: dreamsxin/wire
 @Test
 public void resolveFieldPathMatchesOnlySegment() throws Exception {
   assertThat(asList(Options.resolveFieldPath("a", set("a", "b")))).containsExactly("a");
 }
コード例 #4
0
ファイル: OptionsTest.java プロジェクト: dreamsxin/wire
 @Test
 public void resolveFieldPathMatchesFirstSegment() throws Exception {
   assertThat(asList(Options.resolveFieldPath("a.b.c.d", set("a", "z", "y"))))
       .containsExactly("a", "b", "c", "d");
 }