Skip to content

Commit 27651ef

Browse files
committed
DATAMONGO-1587 - Migrate ticket references in test code to Spring Framework style.
1 parent 174f7f0 commit 27651ef

File tree

154 files changed

+1890
-6798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1890
-6798
lines changed

spring-data-mongodb-log4j/src/test/java/org/springframework/data/mongodb/log4j/MongoLog4jAppenderUnitTests.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013 the original author or authors.
2+
* Copyright 2013-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,10 +24,7 @@
2424
*/
2525
public class MongoLog4jAppenderUnitTests {
2626

27-
/**
28-
* @see DATAMONGO-641
29-
*/
30-
@Test
27+
@Test // DATAMONGO-641
3128
public void closesWithoutMongoInstancePresent() {
3229
new MongoLog4jAppender().close();
3330
}

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/MappingMongoConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public DBRef toDBRef(Object object, MongoPersistentProperty referringProperty) {
328328
Assert.isTrue(annotation != null, "The referenced property has to be mapped with @DBRef!");
329329
}
330330

331-
// @see DATAMONGO-913
331+
// DATAMONGO-913
332332
if (object instanceof LazyLoadingProxy) {
333333
return ((LazyLoadingProxy) object).toDBRef();
334334
}

spring-data-mongodb/src/test/java/ConfigClassInDefaultPackage.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 the original author or authors.
2+
* Copyright 2014-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
2222
/**
2323
* Sample configuration class in default package.
2424
*
25-
* @see DATAMONGO-877
2625
* @author Oliver Gierke
2726
*/
2827
@Configuration

spring-data-mongodb/src/test/java/ConfigClassInDefaultPackageUnitTests.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 the original author or authors.
2+
* Copyright 2014-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,15 +19,11 @@
1919
/**
2020
* Unit test for {@link ConfigClassInDefaultPackage}.
2121
*
22-
* @see DATAMONGO-877
2322
* @author Oliver Gierke
2423
*/
2524
public class ConfigClassInDefaultPackageUnitTests {
2625

27-
/**
28-
* @see DATAMONGO-877
29-
*/
30-
@Test
26+
@Test // DATAMONGO-877
3127
public void loadsConfigClassFromDefaultPackage() {
3228
new AnnotationConfigApplicationContext(ConfigClassInDefaultPackage.class).close();
3329
}

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/config/AbstractMongoConfigurationUnitTests.java

+9-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,10 +55,7 @@ public class AbstractMongoConfigurationUnitTests {
5555

5656
@Rule public ExpectedException exception = ExpectedException.none();
5757

58-
/**
59-
* @see DATAMONGO-496
60-
*/
61-
@Test
58+
@Test // DATAMONGO-496
6259
public void usesConfigClassPackageAsBaseMappingPackage() throws ClassNotFoundException {
6360

6461
AbstractMongoConfiguration configuration = new SampleMongoConfiguration();
@@ -67,30 +64,21 @@ public void usesConfigClassPackageAsBaseMappingPackage() throws ClassNotFoundExc
6764
assertThat(configuration.getInitialEntitySet(), hasItem(Entity.class));
6865
}
6966

70-
/**
71-
* @see DATAMONGO-496
72-
*/
73-
@Test
67+
@Test // DATAMONGO-496
7468
public void doesNotScanPackageIfMappingPackageIsNull() throws ClassNotFoundException {
7569

7670
assertScanningDisabled(null);
7771

7872
}
7973

80-
/**
81-
* @see DATAMONGO-496
82-
*/
83-
@Test
74+
@Test // DATAMONGO-496
8475
public void doesNotScanPackageIfMappingPackageIsEmpty() throws ClassNotFoundException {
8576

8677
assertScanningDisabled("");
8778
assertScanningDisabled(" ");
8879
}
8980

90-
/**
91-
* @see DATAMONGO-569
92-
*/
93-
@Test
81+
@Test // DATAMONGO-569
9482
public void containsMongoDbFactoryButNoMongoBean() {
9583

9684
AbstractApplicationContext context = new AnnotationConfigApplicationContext(SampleMongoConfiguration.class);
@@ -113,10 +101,7 @@ public void returnsUninitializedMappingContext() throws Exception {
113101
assertThat(context.getPersistentEntities(), is(not(emptyIterable())));
114102
}
115103

116-
/**
117-
* @see DATAMONGO-717
118-
*/
119-
@Test
104+
@Test // DATAMONGO-717
120105
public void lifecycleCallbacksAreInvokedInAppropriateOrder() {
121106

122107
AbstractApplicationContext context = new AnnotationConfigApplicationContext(SampleMongoConfiguration.class);
@@ -128,10 +113,7 @@ public void lifecycleCallbacksAreInvokedInAppropriateOrder() {
128113
context.close();
129114
}
130115

131-
/**
132-
* @see DATAMONGO-725
133-
*/
134-
@Test
116+
@Test // DATAMONGO-725
135117
public void shouldBeAbleToConfigureCustomTypeMapperViaJavaConfig() {
136118

137119
AbstractApplicationContext context = new AnnotationConfigApplicationContext(SampleMongoConfiguration.class);
@@ -143,18 +125,12 @@ public void shouldBeAbleToConfigureCustomTypeMapperViaJavaConfig() {
143125
context.close();
144126
}
145127

146-
/**
147-
* @see DATAMONGO-789
148-
*/
149-
@Test
128+
@Test // DATAMONGO-789
150129
public void authenticationDatabaseShouldDefaultToNull() {
151130
assertThat(new SampleMongoConfiguration().getAuthenticationDatabaseName(), is(nullValue()));
152131
}
153132

154-
/**
155-
* @see DATAMONGO-1470
156-
*/
157-
@Test
133+
@Test // DATAMONGO-1470
158134
@SuppressWarnings("unchecked")
159135
public void allowsMultipleEntityBasePackages() throws ClassNotFoundException {
160136

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/config/AuditingIntegrationTests.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,10 +35,7 @@
3535
*/
3636
public class AuditingIntegrationTests {
3737

38-
/**
39-
* @see DATAMONGO-577, DATAMONGO-800, DATAMONGO-883
40-
*/
41-
@Test
38+
@Test // DATAMONGO-577, DATAMONGO-800, DATAMONGO-883
4239
public void enablesAuditingAndSetsPropertiesAccordingly() throws Exception {
4340

4441
AbstractApplicationContext context = new ClassPathXmlApplicationContext("auditing.xml", getClass());

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/config/AuditingViaJavaConfigRepositoriesTests.java

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2016 the original author or authors.
2+
* Copyright 2013-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,10 +79,7 @@ public void setup() {
7979
this.auditor = auditablePersonRepository.save(new AuditablePerson("auditor"));
8080
}
8181

82-
/**
83-
* @see DATAMONGO-792, DATAMONGO-883
84-
*/
85-
@Test
82+
@Test // DATAMONGO-792, DATAMONGO-883
8683
public void basicAuditing() {
8784

8885
doReturn(this.auditor).when(this.auditorAware).getCurrentAuditor();
@@ -96,19 +93,13 @@ public void basicAuditing() {
9693
assertThat(savedUser.getCreatedAt(), is(notNullValue()));
9794
}
9895

99-
/**
100-
* @see DATAMONGO-843
101-
*/
102-
@Test
96+
@Test // DATAMONGO-843
10397
@SuppressWarnings("resource")
10498
public void auditingUsesFallbackMappingContextIfNoneConfiguredWithRepositories() {
10599
new AnnotationConfigApplicationContext(SimpleConfigWithRepositories.class);
106100
}
107101

108-
/**
109-
* @see DATAMONGO-843
110-
*/
111-
@Test
102+
@Test // DATAMONGO-843
112103
@SuppressWarnings("resource")
113104
public void auditingUsesFallbackMappingContextIfNoneConfigured() {
114105
new AnnotationConfigApplicationContext(SimpleConfig.class);

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/config/GeoJsonConfigurationIntegrationTests.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 the original author or authors.
2+
* Copyright 2015-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,10 +43,7 @@ static class Config {}
4343

4444
@Autowired GeoJsonModule geoJsonModule;
4545

46-
/**
47-
* @see DATAMONGO-1181
48-
*/
49-
@Test
46+
@Test // DATAMONGO-1181
5047
public void picksUpGeoJsonModuleConfigurationByDefault() {
5148
assertThat(geoJsonModule, is(notNullValue()));
5249
}

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/config/MappingMongoConverterParserIntegrationTests.java

+9-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011-2014 the original author or authors.
2+
* Copyright 2011-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -58,21 +58,15 @@ public class MappingMongoConverterParserIntegrationTests {
5858

5959
DefaultListableBeanFactory factory;
6060

61-
/**
62-
* @see DATAMONGO-243
63-
*/
64-
@Test
61+
@Test // DATAMONGO-243
6562
public void allowsDbFactoryRefAttribute() {
6663

6764
loadValidConfiguration();
6865
factory.getBeanDefinition("converter");
6966
factory.getBean("converter");
7067
}
7168

72-
/**
73-
* @see DATAMONGO-725
74-
*/
75-
@Test
69+
@Test // DATAMONGO-725
7670
public void hasCustomTypeMapper() {
7771

7872
loadValidConfiguration();
@@ -82,10 +76,7 @@ public void hasCustomTypeMapper() {
8276
assertThat(converter.getTypeMapper(), is(customMongoTypeMapper));
8377
}
8478

85-
/**
86-
* @see DATAMONGO-301
87-
*/
88-
@Test
79+
@Test // DATAMONGO-301
8980
public void scansForConverterAndSetsUpCustomConversionsAccordingly() {
9081

9182
loadValidConfiguration();
@@ -94,10 +85,7 @@ public void scansForConverterAndSetsUpCustomConversionsAccordingly() {
9485
assertThat(conversions.hasCustomWriteTarget(Account.class), is(true));
9586
}
9687

97-
/**
98-
* @see DATAMONGO-607
99-
*/
100-
@Test
88+
@Test // DATAMONGO-607
10189
public void activatesAbbreviatingPropertiesCorrectly() {
10290

10391
loadValidConfiguration();
@@ -109,10 +97,7 @@ public void activatesAbbreviatingPropertiesCorrectly() {
10997
assertThat(strategy.getBeanClassName(), is(CamelCaseAbbreviatingFieldNamingStrategy.class.getName()));
11098
}
11199

112-
/**
113-
* @see DATAMONGO-866
114-
*/
115-
@Test
100+
@Test // DATAMONGO-866
116101
public void rejectsInvalidFieldNamingStrategyConfiguration() {
117102

118103
exception.expect(BeanDefinitionParsingException.class);
@@ -124,10 +109,7 @@ public void rejectsInvalidFieldNamingStrategyConfiguration() {
124109
reader.loadBeanDefinitions(new ClassPathResource("namespace/converter-invalid.xml"));
125110
}
126111

127-
/**
128-
* @see DATAMONGO-892
129-
*/
130-
@Test
112+
@Test // DATAMONGO-892
131113
public void shouldThrowBeanDefinitionParsingExceptionIfConverterDefinedAsNestedBean() {
132114

133115
exception.expect(BeanDefinitionParsingException.class);
@@ -136,18 +118,12 @@ public void shouldThrowBeanDefinitionParsingExceptionIfConverterDefinedAsNestedB
136118
loadNestedBeanConfiguration();
137119
}
138120

139-
/**
140-
* @see DATAMONGO-925, DATAMONGO-928
141-
*/
142-
@Test
121+
@Test // DATAMONGO-925, DATAMONGO-928
143122
public void shouldSupportCustomFieldNamingStrategy() {
144123
assertStrategyReferenceSetFor("mappingConverterWithCustomFieldNamingStrategy");
145124
}
146125

147-
/**
148-
* @see DATAMONGO-925, DATAMONGO-928
149-
*/
150-
@Test
126+
@Test // DATAMONGO-925, DATAMONGO-928
151127
public void shouldNotFailLoadingConfigIfAbbreviationIsDisabledAndStrategySet() {
152128
assertStrategyReferenceSetFor("mappingConverterWithCustomFieldNamingStrategyAndAbbreviationDisabled");
153129
}

0 commit comments

Comments
 (0)