JAL-4199 Add tests to the "Functional" group
[jalview.git] / test / jalview / ws2 / client / slivka / SlivkaWSDiscovererTest.java
index 870acb1..6824a10 100644 (file)
@@ -24,6 +24,7 @@ import org.testng.annotations.Test;
 import jalview.bin.Cache;
 import jalview.bin.Console;
 import jalview.ws.params.ValueConstrainI.ValueType;
+import jalview.ws.params.simple.BooleanOption;
 import jalview.ws.params.simple.DoubleParameter;
 import jalview.ws.params.simple.IntegerParameter;
 import jalview.ws.params.simple.StringParameter;
@@ -55,7 +56,7 @@ public class SlivkaWSDiscovererTest
     clientMock = mock(SlivkaClient.class);
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void getStatusForUrl_servicesReturned_statusIsOK() throws Exception
   {
     when(clientMock.getServices())
@@ -67,7 +68,7 @@ public class SlivkaWSDiscovererTest
         is(WebServiceDiscovererI.STATUS_OK));
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void getStatusForUrl_noServicesReturned_statusIsNoServices()
       throws Exception
   {
@@ -79,7 +80,7 @@ public class SlivkaWSDiscovererTest
         is(WebServiceDiscovererI.STATUS_NO_SERVICES));
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void getStatusForUrl_exceptionThrown_statusIsInvalid()
       throws Exception
   {
@@ -91,7 +92,7 @@ public class SlivkaWSDiscovererTest
         is(WebServiceDiscovererI.STATUS_INVALID));
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void testGetUrls_noPropEntry_defaultUrlReturned()
       throws MalformedURLException
   {
@@ -119,7 +120,7 @@ public class SlivkaWSDiscovererTest
             List.of(new URL("http://example.org")) } };
   }
 
-  @Test(dataProvider = "urlPropertyValues")
+  @Test(groups = { "Functional" }, dataProvider = "urlPropertyValues")
   public void testGetUrls_urlsProperlyParsed(String propValue,
       List<URL> expected)
   {
@@ -128,7 +129,7 @@ public class SlivkaWSDiscovererTest
     assertThat(discoverer.getUrls(), equalTo(expected));
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void testSetUrls_emptyList_propertyReset()
   {
     Cache.setProperty(URLS_PROPERTY_NAME, "http://www.example.org");
@@ -137,7 +138,7 @@ public class SlivkaWSDiscovererTest
     assertThat(Cache.getProperty(URLS_PROPERTY_NAME), is(nullValue()));
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void testSetUrls_null_propertyReset()
   {
     Cache.setProperty(URLS_PROPERTY_NAME, "http://www.example.org");
@@ -159,7 +160,7 @@ public class SlivkaWSDiscovererTest
             "https://www.compbio.dundee.ac.uk/slivka/,http://example.org" }, };
   }
 
-  @Test(dataProvider = "urlsList")
+  @Test(groups = { "Functional" }, dataProvider = "urlsList")
   public void testSetUrls_urlsPropertySet(List<URL> urls, String expected)
       throws MalformedURLException
   {
@@ -168,7 +169,7 @@ public class SlivkaWSDiscovererTest
     assertThat(Cache.getProperty(URLS_PROPERTY_NAME), equalTo(expected));
   }
 
-  @Test
+  @Test(groups = { "Functional" })
   public void testFetchServices_oneService_basicDataMatches()
       throws IOException
   {
@@ -212,7 +213,9 @@ public class SlivkaWSDiscovererTest
 
   }
 
-  @Test(dataProvider = "validMultipleSequenceAlignmentClassifiers")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "validMultipleSequenceAlignmentClassifiers")
   public void testFetchServices_multipleSequenceAlignmentClassifier_serviceTypeIsMSA(
       String classifier) throws IOException
   {
@@ -257,7 +260,9 @@ public class SlivkaWSDiscovererTest
             List.of(), List.of(), null) };
   }
 
-  @Test(dataProvider = "multipleSequenceAlignmentService")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "multipleSequenceAlignmentService")
   public void testFetchServices_multipleSequenceAlignmentService_actionTypeIsAlignment(
       SlivkaService service) throws IOException
   {
@@ -271,7 +276,9 @@ public class SlivkaWSDiscovererTest
         typeCompatibleWith(AlignmentAction.class));
   }
 
-  @Test(dataProvider = "multipleSequenceAlignmentService")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "multipleSequenceAlignmentService")
   public void testFetchServices_multipleSequenceAlignmentService_serviceIsNonInteractive(
       SlivkaService service) throws IOException
   {
@@ -313,7 +320,7 @@ public class SlivkaWSDiscovererTest
             List.of(), List.of(), null), };
   }
 
-  @Test(dataProvider = "clustalFamilyService")
+  @Test(groups = { "Functional" }, dataProvider = "clustalFamilyService")
   public void testFetchService_clustalFamilyService_containsTwoActions(
       SlivkaService service) throws IOException
   {
@@ -362,7 +369,9 @@ public class SlivkaWSDiscovererTest
     return services.iterator();
   }
 
-  @Test(dataProvider = "RNASecondaryStructurePredictionService")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "RNASecondaryStructurePredictionService")
   public void testFetchServices_RNASecStrPredClassifier_serviceTypeIsRNASecStrPred(
       SlivkaService service) throws IOException
   {
@@ -402,7 +411,9 @@ public class SlivkaWSDiscovererTest
     return services.iterator();
   }
 
-  @Test(dataProvider = "validConservationAnalysisClassifiers")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "validConservationAnalysisClassifiers")
   public void testFetchServices_conservationAnalysisClassifier_serviceTypeIsConservation(
       String classifier) throws IOException
   {
@@ -427,7 +438,9 @@ public class SlivkaWSDiscovererTest
         "Operation :: Analysis :: Sequence analysis :: Protein sequence analysis", };
   }
 
-  @Test(dataProvider = "validProteinSequenceAnalysisClassifiers")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "validProteinSequenceAnalysisClassifiers")
   public void testFetchServices_proteinSequenceAnalysisClassifier_serviceTypeIsProtSeqAnalysis(
       String classifier) throws IOException
   {
@@ -460,6 +473,7 @@ public class SlivkaWSDiscovererTest
 
   @Test(
     enabled = false, // sec. str. pred. not implemented for slivka
+    groups = { "Functional" },
     dataProvider = "validProteinSecondaryStructurePredictionClassifiers")
   public void testFetchServices_proteinSecStrPredClassifier_serviceTypeIsProtSecStrPred(
       String classifier) throws IOException
@@ -490,7 +504,7 @@ public class SlivkaWSDiscovererTest
             List.of(), null) };
   }
 
-  @Test(dataProvider = "unrecognisedService")
+  @Test(groups = { "Functional" }, dataProvider = "unrecognisedService")
   public void testFetchServices_unrecognisedService_noServiceDiscovered(
       SlivkaService service) throws IOException
   {
@@ -525,7 +539,7 @@ public class SlivkaWSDiscovererTest
         {
             new Parameter.FlagParameter("param", "Parameter", "Description",
                 true, false, null, Map.of()),
-            StringParameter.class
+            BooleanOption.class
         },
         {
             new Parameter.ChoiceParameter("param", "Parameter", "Description",
@@ -535,7 +549,9 @@ public class SlivkaWSDiscovererTest
     };
   }
 
-  @Test(dataProvider = "serviceParameterAndMappedClass")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "serviceParameterAndMappedClass")
   public void testServiceParameter_slivkaParameterMappedToJalviewParameter(
       Parameter slivkaParameter, Class<?> expectedClass)
       throws IOException
@@ -593,7 +609,9 @@ public class SlivkaWSDiscovererTest
     };
   }
 
-  @Test(dataProvider = "serviceParametersAndInfoMatcher")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "serviceParametersAndPropertyMatcher")
   public void testServiceParameters_testBasicParameterProperties(
       Parameter parameter, Matcher<Object> matcher) throws IOException
   {
@@ -638,7 +656,9 @@ public class SlivkaWSDiscovererTest
     };
   }
 
-  @Test(dataProvider = "integerParametersAndPropertyMatcher")
+  @Test(
+    groups = { "Functional" },
+    dataProvider = "integerParametersAndPropertyMatcher")
   public void testServiceParameters_testIntegerProperties(
       Parameter parameter, Matcher<Object> matcher) throws IOException
   {