Skip to content

Commit 2fc29d9

Browse files
mp911dechristophstrobl
authored andcommitted
Move inner test classes to top-level classes to run these by the Maven build.
Original Pull Request: #2253
1 parent 73b4986 commit 2fc29d9

File tree

3 files changed

+56
-14
lines changed

3 files changed

+56
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.springframework.data.redis.mapping;
17+
18+
import org.springframework.data.redis.hash.Jackson2HashMapper;
19+
20+
/**
21+
* @author Mark Paluch
22+
*/
23+
public class FlatteningJackson2HashMapperUnitTests extends Jackson2HashMapperUnitTests {
24+
FlatteningJackson2HashMapperUnitTests() {
25+
super(new Jackson2HashMapper(true));
26+
}
27+
}

src/test/java/org/springframework/data/redis/mapping/Jackson2HashMapperUnitTests.java

+1-14
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,14 @@
4242
* @author Christoph Strobl
4343
* @author Mark Paluch
4444
*/
45-
public abstract class Jackson2HashMapperUnitTests extends AbstractHashMapperTests {
45+
abstract class Jackson2HashMapperUnitTests extends AbstractHashMapperTests {
4646

4747
private final Jackson2HashMapper mapper;
4848

4949
Jackson2HashMapperUnitTests(Jackson2HashMapper mapper) {
5050
this.mapper = mapper;
5151
}
5252

53-
public static class FlatteningJackson2HashMapperUnitTests extends Jackson2HashMapperUnitTests {
54-
FlatteningJackson2HashMapperUnitTests() {
55-
super(new Jackson2HashMapper(true));
56-
}
57-
}
58-
59-
public static class NonFlatteningJackson2HashMapperUnitTests extends Jackson2HashMapperUnitTests {
60-
61-
NonFlatteningJackson2HashMapperUnitTests() {
62-
super(new Jackson2HashMapper(false));
63-
}
64-
}
65-
6653
@Override
6754
@SuppressWarnings("rawtypes")
6855
protected <T> HashMapper mapperFor(Class<T> t) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.springframework.data.redis.mapping;
17+
18+
import org.springframework.data.redis.hash.Jackson2HashMapper;
19+
20+
/**
21+
* @author Mark Paluch
22+
*/
23+
public class NonFlatteningJackson2HashMapperUnitTests extends Jackson2HashMapperUnitTests {
24+
25+
NonFlatteningJackson2HashMapperUnitTests() {
26+
super(new Jackson2HashMapper(false));
27+
}
28+
}

0 commit comments

Comments
 (0)