use of org.springframework.data.mongodb.core.MongoTemplateTests.PersonWithConvertedId in project spring-data-mongodb by spring-projects.
the class ReactiveMongoTemplateTests method removesObjectFromExplicitCollection.
// DATAMONGO-1444
@Test
void removesObjectFromExplicitCollection() {
String collectionName = "explicit";
template.remove(new Query(), collectionName).as(StepVerifier::create).expectNextCount(1).verifyComplete();
PersonWithConvertedId person = new PersonWithConvertedId();
person.name = "Dave";
//
template.save(person, collectionName).as(//
StepVerifier::create).expectNextCount(//
1).verifyComplete();
//
template.findAll(PersonWithConvertedId.class, collectionName).as(//
StepVerifier::create).expectNextCount(1).verifyComplete();
template.remove(person, collectionName).as(StepVerifier::create).expectNextCount(1).verifyComplete();
template.findAll(PersonWithConvertedId.class, collectionName).as(StepVerifier::create).verifyComplete();
}
Aggregations