Skip to content

Commit 433f643

Browse files
Add @InTestsUseSpringContext
1 parent afaf2a5 commit 433f643

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<modelVersion>4.0.0</modelVersion>
1717
<groupId>com.diffblue.cover</groupId>
1818
<artifactId>cover-annotations</artifactId>
19-
<version>1.8.0</version>
19+
<version>1.9.0</version>
2020
<packaging>jar</packaging>
2121

2222
<name>Cover Annotations</name>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2025 Diffblue Limited.
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+
* A copy of the License is located at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.diffblue.cover.annotations.experimental;
16+
17+
import static java.lang.annotation.ElementType.PACKAGE;
18+
import static java.lang.annotation.ElementType.TYPE;
19+
import static java.lang.annotation.RetentionPolicy.RUNTIME;
20+
21+
import java.lang.annotation.Retention;
22+
import java.lang.annotation.Target;
23+
24+
/**
25+
* This annotation is used to specify that a test requires the usage
26+
* of a specific Spring context during testing. It allows the XML file locations of the
27+
* Spring context to be specified.
28+
*
29+
* @deprecated This annotation is experimental and may change or be removed in future releases. Its
30+
* use is discouraged except for internal experimental purposes.
31+
*/
32+
@Retention(RUNTIME)
33+
@Target({PACKAGE, TYPE})
34+
@Deprecated
35+
public @interface InTestsUseSpringContext {
36+
37+
/**
38+
* Specifies the locations of XML configuration files for the Spring context
39+
* required by a test.
40+
*/
41+
String[] locations();
42+
}

0 commit comments

Comments
 (0)