4444
4545import jakarta .inject .Inject ;
4646import java .net .MalformedURLException ;
47- import java .net .URL ;
47+ import java .net .URI ;
4848import java .util .Collections ;
4949import java .util .List ;
5050
@@ -77,8 +77,8 @@ void setUp() {
7777 @ Test
7878 void loadOneManifest () throws MalformedURLException {
7979 testSuiteDescription .load (List .of (
80- new URL (NS + "test-manifest-sample-1.ttl" ),
81- new URL (NS + "specification-sample-1.ttl" )
80+ URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( ),
81+ URI . create (NS + "specification-sample-1.ttl" ). toURL ( )
8282 ));
8383 assertTrue (ask (iri (NS , "specification1" ), RDF .type , DOAP .Specification ));
8484 assertTrue (ask (iri (NS , "test-manifest-sample-1.ttl#group1-feature1" ),
@@ -92,10 +92,10 @@ void loadOneManifest() throws MalformedURLException {
9292 @ Test
9393 void loadTwoManifest () throws MalformedURLException {
9494 testSuiteDescription .load (List .of (
95- new URL (NS + "test-manifest-sample-1.ttl" ),
96- new URL (NS + "test-manifest-sample-2.ttl" ),
97- new URL (NS + "specification-sample-1.ttl" ),
98- new URL (NS + "specification-sample-2.ttl" )
95+ URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( ),
96+ URI . create (NS + "test-manifest-sample-2.ttl" ). toURL ( ),
97+ URI . create (NS + "specification-sample-1.ttl" ). toURL ( ),
98+ URI . create (NS + "specification-sample-2.ttl" ). toURL ( )
9999 ));
100100 assertTrue (ask (iri (NS , "specification1" ), RDF .type , DOAP .Specification ));
101101 assertTrue (ask (iri (NS , "test-manifest-sample-1.ttl#group1-feature1" ),
@@ -107,7 +107,7 @@ void loadTwoManifest() throws MalformedURLException {
107107
108108 @ Test
109109 void loadRdfa () throws MalformedURLException {
110- testSuiteDescription .load (List .of (new URL (NS + "specification-sample-1.html" )));
110+ testSuiteDescription .load (List .of (URI . create (NS + "specification-sample-1.html" ). toURL ( )));
111111 assertTrue (ask (iri (NS , "specification1" ), RDF .type , DOAP .Specification ));
112112 assertTrue (ask (iri (NS , "specification1#spec1" ), SPEC .statement ,
113113 literal ("text of requirement 1" )));
@@ -116,10 +116,10 @@ void loadRdfa() throws MalformedURLException {
116116 @ Test
117117 void loadTwoManifestMixed () throws MalformedURLException {
118118 testSuiteDescription .load (List .of (
119- new URL (NS + "test-manifest-sample-1.ttl" ),
120- new URL (NS + "test-manifest-sample-2.ttl" ),
121- new URL (NS + "specification-sample-1.html" ),
122- new URL (NS + "specification-sample-2.ttl" )
119+ URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( ),
120+ URI . create (NS + "test-manifest-sample-2.ttl" ). toURL ( ),
121+ URI . create (NS + "specification-sample-1.html" ). toURL ( ),
122+ URI . create (NS + "specification-sample-2.ttl" ). toURL ( )
123123 ));
124124 assertTrue (ask (iri (NS , "specification1" ), RDF .type , DOAP .Specification ));
125125 assertTrue (ask (iri (NS , "test-manifest-sample-1.ttl#group1-feature1" ),
@@ -131,7 +131,7 @@ void loadTwoManifestMixed() throws MalformedURLException {
131131
132132 @ Test
133133 void setNonRunningTestAssertionsNull () throws MalformedURLException {
134- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
134+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
135135 testSuiteDescription .setNonRunningTestAssertions (null , null );
136136 assertEquals (6 , count (null , RDF .type , TD .TestCase ));
137137 assertEquals (0 , count (null , RDF .type , EARL .Assertion ));
@@ -145,7 +145,7 @@ void setNonRunningTestAssertionsNull() throws MalformedURLException {
145145
146146 @ Test
147147 void setNonRunningTestAssertionsEmptyFilters () throws MalformedURLException {
148- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
148+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
149149 testSuiteDescription .setNonRunningTestAssertions (Collections .emptyList (), null );
150150 assertEquals (6 , count (null , RDF .type , TD .TestCase ));
151151 assertEquals (0 , count (null , RDF .type , EARL .Assertion ));
@@ -159,7 +159,7 @@ void setNonRunningTestAssertionsEmptyFilters() throws MalformedURLException {
159159
160160 @ Test
161161 void setNonRunningTestAssertionsEmptyStatuses () throws MalformedURLException {
162- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
162+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
163163 testSuiteDescription .setNonRunningTestAssertions (null , Collections .emptyList ());
164164 assertEquals (6 , count (null , RDF .type , TD .TestCase ));
165165 assertEquals (0 , count (null , RDF .type , EARL .Assertion ));
@@ -173,7 +173,7 @@ void setNonRunningTestAssertionsEmptyStatuses() throws MalformedURLException {
173173
174174 @ Test
175175 void setNonRunningTestAssertionsFilterGroup1 () throws MalformedURLException {
176- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
176+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
177177 testSuiteDescription .setNonRunningTestAssertions (List .of ("group1" ), null );
178178 assertEquals (6 , count (null , RDF .type , TD .TestCase ));
179179 assertEquals (3 , count (null , RDF .type , EARL .Assertion ));
@@ -188,7 +188,7 @@ void setNonRunningTestAssertionsFilterGroup1() throws MalformedURLException {
188188
189189 @ Test
190190 void setNonRunningTestAssertionsStatuesAccepted () throws MalformedURLException {
191- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
191+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
192192 testSuiteDescription .setNonRunningTestAssertions (null , List .of ("accepted" ));
193193 assertEquals (6 , count (null , RDF .type , TD .TestCase ));
194194 assertEquals (1 , count (null , RDF .type , EARL .Assertion ));
@@ -207,7 +207,7 @@ void setNonRunningTestAssertionsStatuesAccepted() throws MalformedURLException {
207207
208208 @ Test
209209 void setNonRunningTestAssertionsStatusUnreviewed () throws MalformedURLException {
210- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
210+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
211211 testSuiteDescription .setNonRunningTestAssertions (null , List .of ("unreviewed" ));
212212 assertEquals (6 , count (null , RDF .type , TD .TestCase ));
213213 assertEquals (5 , count (null , RDF .type , EARL .Assertion ));
@@ -218,7 +218,7 @@ void setNonRunningTestAssertionsStatusUnreviewed() throws MalformedURLException
218218
219219 @ Test
220220 void setNonRunningTestAssertionsBadStatus () throws MalformedURLException {
221- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
221+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
222222 add (iri (NS , "testcase" ), RDF .type , TD .TestCase );
223223 add (iri (NS , "testcase" ), TD .reviewStatus , literal ("ACCEPTED" ));
224224 testSuiteDescription .setNonRunningTestAssertions (null , List .of ("unreviewed" ));
@@ -231,7 +231,7 @@ void setNonRunningTestAssertionsBadStatus() throws MalformedURLException {
231231
232232 @ Test
233233 void setNonRunningTestAssertionsBadStatusNotChecked () throws MalformedURLException {
234- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
234+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
235235 add (iri (NS , "testcase" ), RDF .type , TD .TestCase );
236236 add (iri (NS , "testcase" ), TD .reviewStatus , literal ("ACCEPTED" ));
237237 testSuiteDescription .setNonRunningTestAssertions (null , null );
@@ -242,7 +242,7 @@ void setNonRunningTestAssertionsBadStatusNotChecked() throws MalformedURLExcepti
242242
243243 @ Test
244244 void setNonRunningTestAssertionsMissingStatus () throws MalformedURLException {
245- testSuiteDescription .load (List .of ( new URL (NS + "test-manifest-sample-1.ttl" )));
245+ testSuiteDescription .load (List .of (URI . create (NS + "test-manifest-sample-1.ttl" ). toURL ( )));
246246 add (iri (NS , "testcase" ), RDF .type , TD .TestCase );
247247 testSuiteDescription .setNonRunningTestAssertions (null , List .of ("accepted" , "unreviewed" ));
248248 assertEquals (7 , count (null , RDF .type , TD .TestCase ));
0 commit comments