X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Frenderer%2Fseqfeatures%2FFeatureColourFinderTest.java;h=59566edf45215b76f47b97d06df28e6e74a099e0;hb=3771e24b8898aacbf9ad8b87727972cd4604e3db;hp=a7f228972b19800a39f3a032f42cc6cb2ccdd393;hpb=5adae4008da23589cee57f638dfe02095e1840fd;p=jalview.git diff --git a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java index a7f2289..59566ed 100644 --- a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java @@ -16,8 +16,8 @@ import jalview.schemes.FeatureColour; import java.awt.Color; -import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; +import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; /** @@ -49,7 +49,7 @@ public class FeatureColourFinderTest private FeatureRenderer fr; - @BeforeClass(alwaysRun = true) + @BeforeTest(alwaysRun = true) public void setUp() { // aligned column 8 is sequence position 6 @@ -63,7 +63,8 @@ public class FeatureColourFinderTest } /** - * Clear down any sequence features before each test + * Clear down any sequence features before each test (not as easy as it + * sounds...) */ @BeforeMethod(alwaysRun = true) public void setUpBeforeTest() @@ -85,6 +86,9 @@ public class FeatureColourFinderTest { fr.setGroupVisibility(group, true); } + + fr.clearRenderOrder(); + av.setShowSequenceFeatures(true); } @Test(groups = "Functional") @@ -397,9 +401,10 @@ public class FeatureColourFinderTest /* * add a feature - * it will be automatically set visible but the viewport - * is still configured not to show features + * it will be automatically set visible but we leave + * the viewport configured not to show features */ + av.setShowSequenceFeatures(false); seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12, Float.NaN, "MetalGroup")); FeatureColour red = new FeatureColour(Color.red); @@ -433,5 +438,11 @@ public class FeatureColourFinderTest */ fr.setGroupVisibility("MetalGroup", false); assertFalse(finder.noFeaturesDisplayed()); + + /* + * a finder with no feature renderer + */ + FeatureColourFinder finder2 = new FeatureColourFinder(null); + assertTrue(finder2.noFeaturesDisplayed()); } }