}
/**
- * Tests for the 'compound attribute' key i.e. where first key's value is a map
- * from which we take the value for the second key, e.g. CSQ : Consequence
+ * Tests for the 'compound attribute' key i.e. where first key's value is a
+ * map from which we take the value for the second key, e.g. CSQ : Consequence
*/
@Test(groups = "Functional")
public void testMatches_compoundKey()
FeatureMatcherI fm1 = FeatureMatcher.byAttribute(Condition.LT, "1.2",
"AF");
assertEquals(fm1.toStableString(), "AF LT 1.2");
-
+
FeatureMatcher fm2 = FeatureMatcher.byAttribute(Condition.NotContains,
"path", "CLIN_SIG");
assertEquals(fm2.toStableString(), "CLIN_SIG NotContains path");
-
+
/*
* AND them
*/
fms.and(fm2);
assertEquals(fms.toStableString(),
"(AF LT 1.2) AND (CLIN_SIG NotContains path)");
-
+
/*
* OR them
*/
fms.or(fm2);
assertEquals(fms.toStableString(),
"(AF LT 1.2) OR (CLIN_SIG NotContains path)");
-
+
/*
* attribute or value including space is quoted
*/
fms = FeatureMatcherSet
.fromString("(AF LT 1.2) and (CLIN_SIG NotContains path)");
assertEquals(fms.toStableString(), descriptor);
-
+
descriptor = "(AF LT 1.2) OR (CLIN_SIG NotContains path)";
fms = FeatureMatcherSet.fromString(descriptor);
assertEquals(fms.toStableString(), descriptor);
fms = FeatureMatcherSet
.fromString("(AF LT 1.2) or CLIN_SIG NotContains path");
assertEquals(fms.toStableString(), descriptor);
-
+
descriptor = "(AF LT 1.2) OR (CLIN_SIG NotContains path) OR ('CSQ:Poly Phen' NotMatches 'foo bar')";
fms = FeatureMatcherSet.fromString(descriptor);
assertEquals(fms.toStableString(), descriptor);