DATAMONGO-1592 - Adapt AuditingEventListenerUnitTests to changes in core auditing.

The core auditing implementation now skips the invocation of auditing in case the candidate aggregate doesn't need any auditing in the first place. We needed to adapt the sample class we use to actually carry the necessary auditing annotations.

Related ticket: DATACMNS-957.
This commit is contained in:
Oliver Gierke
2017-01-20 16:33:59 +01:00
parent 45818f26b3
commit 98b3c1678f

View File

@@ -20,6 +20,7 @@ import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import java.util.Arrays;
import java.util.Date;
import org.junit.Before;
import org.junit.Test;
@@ -29,7 +30,9 @@ import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.core.Ordered;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.auditing.IsNewAwareAuditingHandler;
import org.springframework.data.mapping.context.PersistentEntities;
import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
@@ -101,5 +104,7 @@ public class AuditingEventListenerUnitTests {
static class Sample {
@Id String id;
@CreatedDate Date created;
@LastModifiedDate Date modified;
}
}