Esempio n. 1
0
  @Test
  public void itShouldEncodeListOfStringAndInteger() throws Exception {
    encoder.encode(asList("a", 1));

    assertThat(out.toString(), is("l1:ai1ee"));
  }
Esempio n. 2
0
 @Test
 public void itShouldBeApplicableForNull() throws Exception {
   assertThat(encoder.isApplicable(null), is(false));
 }
Esempio n. 3
0
  @Test
  public void itShouldEncodeEmptyList() throws Exception {
    encoder.encode(emptyList());

    assertThat(out.toString(), is("le"));
  }
Esempio n. 4
0
 @Test
 public void itShouldBeApplicableForLists() throws Exception {
   assertThat(encoder.isApplicable(emptyList()), is(true));
 }