Пример #1
0
  @Test
  public void itShouldEncodeListOfStringAndInteger() throws Exception {
    encoder.encode(asList("a", 1));

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

    assertThat(out.toString(), is("le"));
  }
Пример #4
0
 @Test
 public void itShouldBeApplicableForLists() throws Exception {
   assertThat(encoder.isApplicable(emptyList()), is(true));
 }