Skip to content

Commit 2a2d3a8

Browse files
committed
Correct imports for AutoConfigureJson
See gh-47322
1 parent f549467 commit 2a2d3a8

File tree

9 files changed

+145
-4
lines changed

9 files changed

+145
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.boot.gson.autoconfigure.GsonAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
org.springframework.boot.gson.autoconfigure.GsonAutoConfiguration
21
org.springframework.boot.gson.autoconfigure.GsonTesterAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2012-present 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+
17+
package org.springframework.boot.gson.autoconfigure.jsontest;
18+
19+
import com.google.gson.Gson;
20+
import org.junit.jupiter.api.Test;
21+
import org.junit.jupiter.api.extension.ExtendWith;
22+
23+
import org.springframework.beans.factory.annotation.Autowired;
24+
import org.springframework.boot.test.autoconfigure.json.AutoConfigureJson;
25+
import org.springframework.context.ApplicationContext;
26+
import org.springframework.test.context.junit.jupiter.SpringExtension;
27+
28+
import static org.assertj.core.api.Assertions.assertThatNoException;
29+
30+
/**
31+
* Integration tests for {@link AutoConfigureJson @AutoConfigureJson} with Gson.
32+
*
33+
* @author Andy Wilkinson
34+
*/
35+
@AutoConfigureJson
36+
@ExtendWith(SpringExtension.class)
37+
class GsonAutoConfigureJsonIntegrationTests {
38+
39+
@Autowired
40+
private ApplicationContext context;
41+
42+
@Test
43+
void gsonIsAvailable() {
44+
assertThatNoException().isThrownBy(() -> this.context.getBean(Gson.class));
45+
}
46+
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration
21
org.springframework.boot.jackson.autoconfigure.JacksonTesterAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2012-present 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+
17+
package org.springframework.boot.jackson.autoconfigure.jsontest;
18+
19+
import org.junit.jupiter.api.Test;
20+
import org.junit.jupiter.api.extension.ExtendWith;
21+
import tools.jackson.databind.json.JsonMapper;
22+
23+
import org.springframework.beans.factory.annotation.Autowired;
24+
import org.springframework.boot.test.autoconfigure.json.AutoConfigureJson;
25+
import org.springframework.context.ApplicationContext;
26+
import org.springframework.test.context.junit.jupiter.SpringExtension;
27+
28+
import static org.assertj.core.api.Assertions.assertThatNoException;
29+
30+
/**
31+
* Integration tests for {@link AutoConfigureJson @AutoConfigureJson} with Jackson.
32+
*
33+
* @author Andy Wilkinson
34+
*/
35+
@AutoConfigureJson
36+
@ExtendWith(SpringExtension.class)
37+
class JacksonAutoConfigureJsonIntegrationTests {
38+
39+
@Autowired
40+
private ApplicationContext context;
41+
42+
@Test
43+
void jsonMapperIsAvailable() {
44+
assertThatNoException().isThrownBy(() -> this.context.getBean(JsonMapper.class));
45+
}
46+
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.boot.jsonb.autoconfigure.JsonbAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
org.springframework.boot.jsonb.autoconfigure.JsonbAutoConfiguration
2-
org.springframework.boot.jsonb.autoconfigure.JsonbTesterAutoConfiguration
1+
org.springframework.boot.jsonb.autoconfigure.JsonbTesterAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2012-present 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+
17+
package org.springframework.boot.jsonb.autoconfigure.jsontest;
18+
19+
import jakarta.json.bind.Jsonb;
20+
import org.junit.jupiter.api.Test;
21+
import org.junit.jupiter.api.extension.ExtendWith;
22+
23+
import org.springframework.beans.factory.annotation.Autowired;
24+
import org.springframework.boot.test.autoconfigure.json.AutoConfigureJson;
25+
import org.springframework.context.ApplicationContext;
26+
import org.springframework.test.context.junit.jupiter.SpringExtension;
27+
28+
import static org.assertj.core.api.Assertions.assertThatNoException;
29+
30+
/**
31+
* Integration tests for {@link AutoConfigureJson @AutoConfigureJson} with JSON-B.
32+
*
33+
* @author Andy Wilkinson
34+
*/
35+
@AutoConfigureJson
36+
@ExtendWith(SpringExtension.class)
37+
class JsonbAutoConfigureJsonIntegrationTests {
38+
39+
@Autowired
40+
private ApplicationContext context;
41+
42+
@Test
43+
void jsonbIsAvailable() {
44+
assertThatNoException().isThrownBy(() -> this.context.getBean(Jsonb.class));
45+
}
46+
47+
}

0 commit comments

Comments
 (0)