コード例 #1
0
  @Test
  public void usagesAreDelegatedToExtractor() {
    usages = newArrayList("1:2", "a:b");
    Dictionary<String> actual = sut.newDictionary(usages);
    Dictionary<String> expected = createDictionary("1", "2", "a", "b");

    assertEquals(expected, actual);
    verify(extractor).extract("1:2");
    verify(extractor).extract("a:b");
  }
コード例 #2
0
  @Test
  public void predicateFiltersResult() {
    usages = newArrayList("1:2", "a:b");
    Dictionary<String> actual = sut.newDictionary(usages, noA());
    Dictionary<String> expected = createDictionary("1", "2", "b");

    assertEquals(expected, actual);

    verify(extractor).extract("1:2");
    verify(extractor).extract("a:b");
  }
コード例 #3
0
 public void asd() {
   usages = newArrayList("1:2", "a:b", "1");
   Dictionary<String> actual = sut.newDictionary(usages);
   Dictionary<String> expected = createDictionary("1", "2", "a", "b");
   assertEquals(expected, actual);
 }