From 9a3889baec5ddeb49398ce3c7f98063d20950b7f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 16 Feb 2021 15:14:54 +0000 Subject: [PATCH] Align with breaking change in Spring Data MongoDB See gh-25004 --- .../data/mongo/MongoDataAutoConfigurationTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java index 27e7082930..253eb0b861 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 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. @@ -44,8 +44,8 @@ import org.springframework.data.mongodb.MongoDatabaseFactory; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory; import org.springframework.data.mongodb.core.convert.MongoCustomConversions; -import org.springframework.data.mongodb.core.mapping.BasicMongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoMappingContext; +import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty; import org.springframework.data.mongodb.gridfs.GridFsTemplate; import org.springframework.test.util.ReflectionTestUtils; @@ -177,7 +177,7 @@ class MongoDataAutoConfigurationTests { void registersDefaultSimpleTypesWithMappingContext() { this.contextRunner.run((context) -> { MongoMappingContext mappingContext = context.getBean(MongoMappingContext.class); - BasicMongoPersistentEntity entity = mappingContext.getPersistentEntity(Sample.class); + MongoPersistentEntity entity = mappingContext.getPersistentEntity(Sample.class); MongoPersistentProperty dateProperty = entity.getPersistentProperty("date"); assertThat(dateProperty.isEntity()).isFalse(); });