X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fdatamodel%2Ffeatures%2FFeatureMatcherSetTest.java;fp=test%2Fjalview%2Fdatamodel%2Ffeatures%2FFeatureMatcherSetTest.java;h=3bd125e29f15f8ef709d9cecfe248b526493c7c3;hb=9c98d4bd666346f6ad3892c5394b7da3be82d93e;hp=a2d2c9a85799015bc2d588a0648ea08b94dd2091;hpb=c7b2143c9cf7c5e05ad63251f7d3910751b16d20;p=jalview.git diff --git a/test/jalview/datamodel/features/FeatureMatcherSetTest.java b/test/jalview/datamodel/features/FeatureMatcherSetTest.java index a2d2c9a..3bd125e 100644 --- a/test/jalview/datamodel/features/FeatureMatcherSetTest.java +++ b/test/jalview/datamodel/features/FeatureMatcherSetTest.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel.features; import static org.testng.Assert.assertEquals; @@ -240,8 +260,8 @@ public class FeatureMatcherSetTest } /** - * 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() @@ -297,11 +317,11 @@ public class FeatureMatcherSetTest 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 */ @@ -314,7 +334,7 @@ public class FeatureMatcherSetTest fms.and(fm2); assertEquals(fms.toStableString(), "(AF LT 1.2) AND (CLIN_SIG NotContains path)"); - + /* * OR them */ @@ -325,7 +345,7 @@ public class FeatureMatcherSetTest fms.or(fm2); assertEquals(fms.toStableString(), "(AF LT 1.2) OR (CLIN_SIG NotContains path)"); - + /* * attribute or value including space is quoted */ @@ -376,7 +396,7 @@ public class FeatureMatcherSetTest 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); @@ -390,7 +410,7 @@ public class FeatureMatcherSetTest 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);