X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FProgressBarTest.java;h=4346420ba25929aac1a690284b11b0f705809389;hb=2f497e35821e09179115565d29a26f41186385c7;hp=192c941733f982c74f3c522df20c8adb34d665fd;hpb=3412b273e964fb1a9d22564b04a5f0c827ec2461;p=jalview.git diff --git a/test/jalview/gui/ProgressBarTest.java b/test/jalview/gui/ProgressBarTest.java index 192c941..4346420 100644 --- a/test/jalview/gui/ProgressBarTest.java +++ b/test/jalview/gui/ProgressBarTest.java @@ -1,9 +1,28 @@ +/* + * 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.gui; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; -import org.testng.annotations.Test; -import org.testng.Assert; + import java.awt.Component; import java.awt.FlowLayout; import java.awt.GridLayout; @@ -11,6 +30,9 @@ import java.awt.GridLayout; import javax.swing.JLabel; import javax.swing.JPanel; +import org.testng.Assert; +import org.testng.annotations.Test; + public class ProgressBarTest { @@ -18,7 +40,7 @@ public class ProgressBarTest private JLabel statusBar; - @Test + @Test(groups = { "Functional" }) public void testConstructor_prematureInstantiation() { try @@ -31,7 +53,7 @@ public class ProgressBarTest } } - @Test + @Test(groups = { "Functional" }) public void testConstructor_wrongLayout() { statusPanel = new JPanel(); @@ -46,7 +68,7 @@ public class ProgressBarTest } } - @Test + @Test(groups = { "Functional" }) public void testSetProgressBar() { statusPanel = new JPanel(); @@ -59,30 +81,26 @@ public class ProgressBarTest * Add 'hello' */ pb.setProgressBar("hello", 1L); - verifyProgress(layout, new String[] - { "hello" }); + verifyProgress(layout, new String[] { "hello" }); /* * Add 'world' */ pb.setProgressBar("world", 2L); - verifyProgress(layout, new String[] - { "hello", "world" }); + verifyProgress(layout, new String[] { "hello", "world" }); /* * Remove 'hello' with no status bar update */ pb.setProgressBar(null, 1L); - verifyProgress(layout, new String[] - { "world" }); + verifyProgress(layout, new String[] { "world" }); assertEquals("nothing", statusBar.getText()); /* * Remove 'world' with status bar update */ pb.setProgressBar("goodbye", 2L); - verifyProgress(layout, new String[] - {}); + verifyProgress(layout, new String[] {}); assertEquals("goodbye", statusBar.getText()); }