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 7c4b5a1812
commit 7c61134b67

View File

@@ -19,6 +19,7 @@ import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
import java.util.Arrays;
import java.util.Date;
import org.junit.Before;
import org.junit.Test;
@@ -27,7 +28,9 @@ import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectFactory;
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;
}
}