11/*
2- * Copyright 2012, UCAR /Unidata.
3- * See the LICENSE file for more information.
2+ * Copyright (c) 2012-2026 University Corporation for Atmospheric Research /Unidata
3+ * See LICENSE for license information.
44 */
55
66package dap4 .test ;
2222import java .util .List ;
2323import ucar .unidata .util .test .category .NeedsExternalResource ;
2424
25- /**
26- * This Test uses the JUNIT Version 4 parameterized test mechanism.
27- * The set of arguments for each test is encapsulated in a class
28- * called TestCase. This allows for code re-use and for extending
29- * tests by adding fields to the TestCase object.
30- */
3125
3226/**
3327 * This test set reads DAP4 datasets (both constrained and not)
@@ -48,7 +42,8 @@ public class TestHyrax extends DapTestCommon implements Dap4ManifestIF {
4842
4943 // Define the input set location(s)
5044 protected static final String INPUTEXT = "" ;
51- protected static final String INPUTQUERY = "?dap4.checksum=true" ;
45+ // request checksums true, false, and default
46+ protected static final String [] INPUTQUERY = new String [] {"?dap4.checksum=true" , "?dap4.checksum=false" , "" };
5247 protected static final String INPUTFRAG = "#dap4&hyrax" ;
5348
5449 protected static final String BASELINEDIR = "/baselinehyrax" ;
@@ -112,14 +107,24 @@ public static List<TestCaseCommon> defineTestCases() {
112107 String file = tuple [0 ];
113108 String prefix = tuple [1 ];
114109 String query = tuple [2 ]; // excluding leading '?'
115- // Unfortunately, The OPeNDAP test server does not appear to support https:
116- String url = server .getURL ("http:" ) + "/" + prefix + "/" + file + INPUTEXT + INPUTQUERY ;
117- if (query != null )
118- url += ("&" + DapConstants .CONSTRAINTTAG + "=" + query );
119- url += INPUTFRAG ;
120- String baseline = resourceroot + BASELINEDIR + "/" + file + BASELINEEXT ;
121- TestCase tc = new TestCase (file , url , baseline , query );
122- testcases .add (tc );
110+ for (String IQ : INPUTQUERY ) {
111+ // Unfortunately, The OPeNDAP test server does not appear to support https:
112+ String url = server .getURL ("http:" ) + "/" + prefix + "/" + file + INPUTEXT + IQ ;
113+ System .out .println (url );
114+ if (query != null ) {
115+ if (IQ .isEmpty ()) {
116+ url += ("?" );
117+ } else {
118+ url += ("&" );
119+ }
120+ url += (DapConstants .CONSTRAINTTAG + "=" + query );
121+ }
122+
123+ url += INPUTFRAG ;
124+ String baseline = resourceroot + BASELINEDIR + "/" + file + BASELINEEXT ;
125+ TestCase tc = new TestCase (file , url , baseline , query );
126+ testcases .add (tc );
127+ }
123128 }
124129 return testcases ;
125130 }
0 commit comments