1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.binding;
17
18 import org.apache.ibatis.session.Configuration;
19 import org.junit.jupiter.api.Assertions;
20 import org.junit.jupiter.api.Test;
21
22 class WrongNamespacesTest {
23
24 @Test
25 void shouldFailForWrongNamespace() {
26 Configuration configuration = new Configuration();
27 Assertions.assertThrows(RuntimeException.class, () -> configuration.addMapper(WrongNamespaceMapper.class));
28 }
29
30 @Test
31 void shouldFailForMissingNamespace() {
32 Configuration configuration = new Configuration();
33 Assertions.assertThrows(RuntimeException.class, () -> configuration.addMapper(MissingNamespaceMapper.class));
34 }
35
36 }