File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed
validator/src/test/java/org/lfenergy/compas/scl/validator Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 15
15
import static org .lfenergy .compas .scl .validator .util .StaxUtil .getAttributeValue ;
16
16
import static org .lfenergy .compas .scl .validator .util .StaxUtil .isElement ;
17
17
18
- public class StaxUtilTest {
18
+ class StaxUtilTest {
19
19
@ Test
20
20
void constructor_WhenConstructorCalled_ThenShouldThrowExceptionCauseForbidden () {
21
21
assertThrows (UnsupportedOperationException .class , StaxUtil ::new );
Original file line number Diff line number Diff line change
1
+ // SPDX-FileCopyrightText: 2022 Alliander N.V.
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ package org .lfenergy .compas .scl .validator .xsd .resourceresolver ;
5
+
6
+ import org .junit .jupiter .api .Test ;
7
+
8
+ import java .io .IOException ;
9
+ import java .nio .charset .StandardCharsets ;
10
+
11
+ import static org .junit .jupiter .api .Assertions .*;
12
+
13
+ class ResourceInputTest {
14
+ @ Test
15
+ void allGetters_WhenCalled_ThenCorrectValueIsReturned () throws IOException {
16
+ var firstInputStream = this .getClass ().getResourceAsStream ("/scl/example.scd" );
17
+ var secondInputStream = this .getClass ().getResourceAsStream ("/scl/example.scd" );
18
+
19
+ var input = new ResourceInput ("1" , "2" , firstInputStream );
20
+
21
+ assertEquals ("1" , input .getPublicId ());
22
+ assertEquals ("2" , input .getSystemId ());
23
+ assertNull (input .getBaseURI ());
24
+ assertNull (input .getByteStream ());
25
+ assertFalse (input .getCertifiedText ());
26
+ assertNull (input .getCharacterStream ());
27
+ assertNull (input .getEncoding ());
28
+
29
+ var expectedStringData = new String (secondInputStream .readAllBytes (), StandardCharsets .UTF_8 );
30
+ assertEquals (expectedStringData .hashCode (), input .getStringData ().hashCode ());
31
+ }
32
+ }
Original file line number Diff line number Diff line change
1
+ // SPDX-FileCopyrightText: 2022 Alliander N.V.
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ package org .lfenergy .compas .scl .validator .xsd .resourceresolver ;
5
+
6
+ class ResourceResolverTest {
7
+ }
You can’t perform that action at this time.
0 commit comments