コード例 #1
0
 public void testFilterE() throws Exception {
   InputStream in;
   // all these should match, once filtered, the string HtmlHashEFiltered
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashE), ENC);
   String filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashF), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashG), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashH), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashI), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashJ), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashK), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashL), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
   in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashO), ENC);
   filtStr = StringUtil.fromInputStream(in);
   assertEquals(HtmlHashEFiltered, filtStr);
 }
コード例 #2
0
  public void testFilterViewedBy() throws Exception {
    InputStream in;
    String filtStr = null;

    in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashN), ENC);
    filtStr = StringUtil.fromInputStream(in);
    assertEquals(HtmlHashNFiltered, filtStr);

    in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashP), ENC);
    filtStr = StringUtil.fromInputStream(in);
    assertEquals(HtmlHashPFiltered, filtStr);
  }
コード例 #3
0
  public void testFilterB() throws Exception {
    InputStream inB;

    inB = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashB), ENC);
    String filtStrB = StringUtil.fromInputStream(inB);
    assertEquals(HtmlHashBFiltered, filtStrB);
  }
コード例 #4
0
  public void testFilterD() throws Exception {
    InputStream in;

    in = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashD), ENC);
    String filtStr = StringUtil.fromInputStream(in);
    assertEquals(HtmlHashDFiltered, filtStr);
  }
コード例 #5
0
  public void testFilterA() throws Exception {
    InputStream inA;

    // viewed-by test
    inA = fact.createFilteredInputStream(mau, new StringInputStream(HtmlHashA), ENC);
    String filtStrA = StringUtil.fromInputStream(inA);

    assertEquals(HtmlHashAFiltered, filtStrA);
  }