@Test public void testSetHostNormal() { String[] testInput = {"ffff7.com", "www2.ffff7.com", "www.ffff7.com", "www1.ffff7.com", "ffff.tv", "www2.ffff.tv", "www.ffff.tv", "www1.ffff.tv", "www.ffff.co", "www2.ffff.co", "www1.ffff.co", "ffff3.net", "www2.ffff3.net", "www.ffff3.net", "ab.com", "www8.ab.com", "www.ab.com", "boom.edu", "www1.boom.edu", "www.boom.edu", "www.wlw.com", "wlw.com", "www.zyfoobar.edu", "zyfoobar.edu"}; String[] expectedOutput = {"ffff7.com", "ffff7.com", "ffff7.com", "ffff7.com", "ffff.tv", "ffff.tv", "ffff.tv", "ffff.tv", "ffff.co", "ffff.co", "ffff.co", "ffff3.net", "ffff3.net", "ffff3.net", "ab.com", "ab.com", "ab.com", "boom.edu", "boom.edu", "boom.edu", "wlw.com", "wlw.com", "zyfoobar.edu", "zyfoobar.edu"}; assertEquals(testInput.length, expectedOutput.length); for (int i = 0; i < testInput.length; i++) { BundleFilterURL filterURL = new BundleFilterURL() .setField(AutoField.newAutoField("input")) .setHostNormal(AutoField.newAutoField("host"));; String[] input = new String[]{"input", null, "host", ""}; input[1] = "http: MapBundle bundle = MapBundle.createBundle(input); assertTrue(filterURL.filter(bundle)); assertEquals(expectedOutput[i], bundle.get("host")); } }
public BundleFilterURL setHostNormal(AutoField value) { this.setHostNormal = value; return this; }
BundleFilterURL implements BundleFilter { public BundleFilterURL setHostNormal(AutoField value) { this.setHostNormal = value; return this; } }
BundleFilterURL implements BundleFilter { public BundleFilterURL setHostNormal(AutoField value) { this.setHostNormal = value; return this; } BundleFilterURL(); }
BundleFilterURL implements BundleFilter { public BundleFilterURL setHostNormal(AutoField value) { this.setHostNormal = value; return this; } BundleFilterURL(); BundleFilterURL setHost(AutoField value); BundleFilterURL setHostNormal(AutoField value); BundleFilterURL setField(AutoField value); BundleFilterURL setBaseDomain(boolean value); BundleFilterURL setTopPrivateDomain(boolean value); BundleFilterURL setFixProto(boolean value); @Override boolean filter(Bundle bundle); }
BundleFilterURL implements BundleFilter { public BundleFilterURL setHostNormal(AutoField value) { this.setHostNormal = value; return this; } BundleFilterURL(); BundleFilterURL setHost(AutoField value); BundleFilterURL setHostNormal(AutoField value); BundleFilterURL setField(AutoField value); BundleFilterURL setBaseDomain(boolean value); BundleFilterURL setTopPrivateDomain(boolean value); BundleFilterURL setFixProto(boolean value); @Override boolean filter(Bundle bundle);  }