public bool matches(Example e) { foreach (String key in attrValues.Keys) { if (!(attrValues[key].Equals(e.getAttributeValueAsString(key)))) { return false; } } return true; // return e.targetValue().Equals(targetValue); }
public void testDLTestMatchFailsOnMismatchedExample() { DataSet ds = DataSetFactory.getRestaurantDataSet(); Example e = ds.getExample(0); DLTest test = new DLTest(); test.add("type", "Thai"); Assert.IsFalse(test.matches(e)); }