DATACMNS-973 - Migrate ticket references in test code to Spring Framework style.

This commit is contained in:
Mark Paluch
2017-01-13 08:45:25 +01:00
parent a946d651ff
commit 4eb1ae8de2
146 changed files with 1080 additions and 3893 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2015 the original author or authors.
* Copyright 2008-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -142,10 +142,7 @@ public class AuditingHandlerUnitTests {
assertNull(user.getLastModifiedDate());
}
/**
* @see DATAJPA-9
*/
@Test
@Test // DATAJPA-9
public void usesDateTimeProviderIfConfigured() {
DateTimeProvider provider = mock(DateTimeProvider.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,10 +60,7 @@ public class DefaultAuditableBeanWrapperFactoryUnitTests {
assertThat(wrapper, is(nullValue()));
}
/**
* @see DATACMNS-643
*/
@Test
@Test // DATACMNS-643
public void setsJsr310AndThreeTenBpTypes() {
Jsr310ThreeTenBpAuditedUser user = new Jsr310ThreeTenBpAuditedUser();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2015 the original author or authors.
* Copyright 2008-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,26 +72,17 @@ public class IsNewAwareAuditingHandlerUnitTests extends AuditingHandlerUnitTests
assertThat(user.modifiedDate, is(notNullValue()));
}
/**
* @see DATACMNS-365
*/
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class) // DATACMNS-365
public void rejectsNullMappingContext() {
new IsNewAwareAuditingHandler((PersistentEntities) null);
}
/**
* @see DATACMNS-365
*/
@Test
@Test // DATACMNS-365
public void setsUpHandlerWithMappingContext() {
new IsNewAwareAuditingHandler(new PersistentEntities(Collections.<MappingContext<?, ?>> emptySet()));
}
/**
* @see DATACMNS-638
*/
@Test
@Test // DATACMNS-638
public void handlingNullIsANoOp() {
IsNewAwareAuditingHandler handler = getHandler();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,10 +58,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
factory = new MappingAuditableBeanWrapperFactory(entities);
}
/**
* @see DATACMNS-365
*/
@Test
@Test // DATACMNS-365
public void discoversAuditingPropertyOnField() {
Sample sample = new Sample();
@@ -73,10 +70,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
assertThat(sample.createdBy, is(notNullValue()));
}
/**
* @see DATACMNS-365
*/
@Test
@Test // DATACMNS-365
public void discoversAuditingPropertyOnAccessor() {
Sample sample = new Sample();
@@ -88,10 +82,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
assertThat(sample.lastModifiedBy, is(notNullValue()));
}
/**
* @see DATACMNS-365
*/
@Test
@Test // DATACMNS-365
public void settingInavailablePropertyIsNoop() {
Sample sample = new Sample();
@@ -100,28 +91,19 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
wrapper.setLastModifiedDate(new GregorianCalendar());
}
/**
* @see DATACMNS-365
*/
@Test
@Test // DATACMNS-365
public void doesNotReturnWrapperForEntityNotUsingAuditing() {
assertThat(factory.getBeanWrapperFor(new NoAuditing()), is(nullValue()));
}
/**
* @see DATACMNS-365
*/
@Test
@Test // DATACMNS-365
public void returnsAuditableWrapperForAuditable() {
assertThat(factory.getBeanWrapperFor(mock(ExtendingAuditable.class)),
is(instanceOf(AuditableInterfaceBeanWrapper.class)));
}
/**
* @see DATACMNS-638
*/
@Test
@Test // DATACMNS-638
public void returnsLastModificationCalendarAsCalendar() {
Date reference = new Date();
@@ -132,10 +114,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
assertLastModificationDate(calendar, reference);
}
/**
* @see DATACMNS-638
*/
@Test
@Test // DATACMNS-638
public void returnsLastModificationDateTimeAsCalendar() {
DateTime reference = new DateTime();
@@ -143,10 +122,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
assertLastModificationDate(reference, reference.toDate());
}
/**
* @see DATACMNS-638
*/
@Test
@Test // DATACMNS-638
public void returnsLastModificationDateAsCalendar() {
Date reference = new Date();
@@ -154,10 +130,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
assertLastModificationDate(reference, reference);
}
/**
* @see DATACMNS-638, DATACMNS-43
*/
@Test
@Test // DATACMNS-638, DATACMNS-43
public void returnsLastModificationJsr310DateTimeAsCalendar() {
LocalDateTime reference = LocalDateTime.now();
@@ -165,10 +138,7 @@ public class MappingAuditableBeanWrapperFactoryUnitTests {
assertLastModificationDate(reference, LocalDateTimeToDateConverter.INSTANCE.convert(reference));
}
/**
* @see DATACMNS-638, DATACMNS-43
*/
@Test
@Test // DATACMNS-638, DATACMNS-43
public void returnsLastModificationThreeTenBpDateTimeAsCalendar() {
org.threeten.bp.LocalDateTime reference = org.threeten.bp.LocalDateTime.now();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2017 the original author or authors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -41,10 +41,7 @@ public class AuditingBeanDefinitionRegistrarSupportUnitTests {
@Mock BeanDefinitionRegistry registry;
/**
* @see DATCMNS-389
*/
@Test
@Test // DATCMNS-389
public void testRegisterBeanDefinitions() {
AuditingBeanDefinitionRegistrarSupport registrar = new DummyAuditingBeanDefinitionRegistrarSupport();