1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.submitted.disallowdotsonnames;
17
18 import java.io.IOException;
19 import java.io.Reader;
20
21 import org.apache.ibatis.exceptions.PersistenceException;
22 import org.apache.ibatis.io.Resources;
23 import org.apache.ibatis.session.SqlSessionFactoryBuilder;
24 import org.junit.jupiter.api.Assertions;
25 import org.junit.jupiter.api.Test;
26
27 class DisallowDotsOnNamesTest {
28
29 @Test
30 void testShouldNotAllowMappedStatementsWithDots() throws IOException {
31 Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/disallowdotsonnames/ibatisConfig.xml");
32 Assertions.assertThrows(PersistenceException.class, () -> new SqlSessionFactoryBuilder().build(reader));
33 }
34
35 }