Examples of ExactComparator


Examples of no.priv.garshol.duke.comparators.ExactComparator

    ConfigurationImpl cfg = new ConfigurationImpl();
    cfg.addDatabase(new InMemoryDatabase());
    cfg.addDataSource(0, csv);

    Comparator cmp = new ExactComparator();

    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("id"));
    props.add(new PropertyImpl("name", cmp, 0.0, 1.0));
    props.add(new PropertyImpl("age", cmp, 0.0, 1.0));
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

public class ConfigurationTest {
 
  @Test
  public void testTrivial() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    config.validate();
  }
 
  @Test
  public void testWithZeroes() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    config.validate();
  }
 
  @Test
  public void testJustOne() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.0, 1.0);
    props.add(name);
    props.add(new PropertyImpl("EMAIL", comp, 0.0, 0.0));
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    }
  }
 
  @Test
  public void testNoIdProperties() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
    props.add(email);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    }
  }
 
  @Test
  public void testThresholdTooHigh() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    }
  }
 
  @Test
  public void testLookupProperties() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    assertTrue(lookups.contains(email));
  }

  @Test
  public void testLookupPropertiesDefault() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    assertTrue(lookups.contains(email));
  }

  @Test
  public void testLookupPropertiesTurnedOn() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.3, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.3, 0.8);
View Full Code Here

Examples of no.priv.garshol.duke.comparators.ExactComparator

    assertTrue(lookups.contains(phone));
  }

  @Test
  public void testLookupPropertiesNotByDefault() throws IOException {
    ExactComparator comp = new ExactComparator();
    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("ID"));
    Property name = new PropertyImpl("NAME", comp, 0.48, 0.8);
    props.add(name);
    Property email = new PropertyImpl("EMAIL", comp, 0.48, 0.8);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.