Package edu.cmu.cs.fusion.test

Examples of edu.cmu.cs.fusion.test.TestEnvironment


  @Test
  public void testTruthFalse2() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(2)});
    Predicate pred = new TestPredicate(relPred, utils.getVar(0));
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.TRUE);
    assertEquals(ThreeValue.FALSE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here


  public void testTruthNotFalse1() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(3)});
    TestPredicate pred = new TestPredicate(relPred, utils.getVar(0));
    pred.setPositive(false);
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.FALSE);
    assertEquals(ThreeValue.TRUE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  public void testTruthNotFalse2() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(2)});
    TestPredicate pred = new TestPredicate(relPred, utils.getVar(0));
    pred.setPositive(false);
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.TRUE);
    assertEquals(ThreeValue.TRUE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthUnknown1() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(2)});
    Predicate pred = new TestPredicate(relPred, utils.getVar(0));
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.UNKNOWN);
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthUnknown2() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(2), utils.getVar(3)});
    Predicate pred = new TestPredicate(relPred, utils.getVar(0));
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.TRUE);
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  public void testTruthNotUnknown1() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(2)});
    TestPredicate pred = new TestPredicate(relPred, utils.getVar(0));
    pred.setPositive(false);
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.UNKNOWN);
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  public void testTruthNotUnknown2() {
    RelationshipPredicate relPred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(2), utils.getVar(3)});
    TestPredicate pred = new TestPredicate(relPred, utils.getVar(0));
    pred.setPositive(false);
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.TRUE);
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  }
 
  @Test
  public void testTruthFalse() {
    ReferenceEqualityPredicate pred = new ReferenceEqualityPredicate(utils.getVar(0), utils.getVar(1));
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), null);
   
    assertEquals(ThreeValue.FALSE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  }

  @Test
  public void testTruthTrue() {
    ReferenceEqualityPredicate pred = new ReferenceEqualityPredicate(utils.getVar(1), utils.getVar(3));
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), null);
   
    assertEquals(ThreeValue.TRUE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthNotFalse() {
    ReferenceEqualityPredicate pred = new ReferenceEqualityPredicate(utils.getVar(0), utils.getVar(1));
    pred.setPositive(false);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), null);
   
    assertEquals(ThreeValue.TRUE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.test.TestEnvironment

Copyright © 2018 www.massapicom. 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.