1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.validator;
18
19 import static org.junit.jupiter.api.Assertions.assertNotNull;
20
21 import java.net.URL;
22 import java.util.Locale;
23
24 import org.junit.jupiter.api.Test;
25
26
27
28
29 public class EntityImportTest extends AbstractCommonTest {
30
31
32
33
34 @Test
35 public void testEntityImport() throws Exception {
36 final URL url = getClass().getResource("EntityImportTest-config.xml");
37 final ValidatorResources resources = new ValidatorResources(url.toExternalForm());
38 assertNotNull(resources.getForm(Locale.getDefault(), "byteForm"), "Form should be found");
39 }
40
41
42
43
44 @Test
45 public void testParseURL() throws Exception {
46 final URL url = getClass().getResource("EntityImportTest-config.xml");
47 final ValidatorResources resources = new ValidatorResources(url);
48 assertNotNull(resources.getForm(Locale.getDefault(), "byteForm"), "Form should be found");
49 }
50 }