mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-13 23:52:10 +00:00
DATAES-46 - Apply code formatting
This commit is contained in:
parent
705adf25f2
commit
cf54ba4e8f
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 the original author or authors.
|
* Copyright 2014 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -32,28 +32,27 @@ import static org.mockito.Mockito.doReturn;
|
|||||||
@RunWith(MockitoJUnitRunner.class)
|
@RunWith(MockitoJUnitRunner.class)
|
||||||
public class ElasticsearchEntityInformationCreatorImplTest {
|
public class ElasticsearchEntityInformationCreatorImplTest {
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext;
|
private MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext;
|
||||||
@Mock
|
@Mock
|
||||||
private ElasticsearchPersistentEntity<String> persistentEntity;
|
private ElasticsearchPersistentEntity<String> persistentEntity;
|
||||||
private ElasticsearchEntityInformationCreatorImpl entityInfoCreator;
|
private ElasticsearchEntityInformationCreatorImpl entityInfoCreator;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() {
|
public void before() {
|
||||||
entityInfoCreator = new ElasticsearchEntityInformationCreatorImpl(mappingContext);
|
entityInfoCreator = new ElasticsearchEntityInformationCreatorImpl(mappingContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void shouldThrowIllegalArgumentExceptionOnMissingEntity() {
|
public void shouldThrowIllegalArgumentExceptionOnMissingEntity() {
|
||||||
entityInfoCreator.getEntityInformation(String.class);
|
entityInfoCreator.getEntityInformation(String.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void shouldThrowIllegalArgumentExceptionOnMissingIdAnnotation() {
|
public void shouldThrowIllegalArgumentExceptionOnMissingIdAnnotation() {
|
||||||
doReturn(persistentEntity).when(mappingContext).getPersistentEntity(String.class);
|
doReturn(persistentEntity).when(mappingContext).getPersistentEntity(String.class);
|
||||||
doReturn(String.class).when(persistentEntity).getType();
|
doReturn(String.class).when(persistentEntity).getType();
|
||||||
doReturn(null).when(persistentEntity).getIdProperty();
|
doReturn(null).when(persistentEntity).getIdProperty();
|
||||||
entityInfoCreator.getEntityInformation(String.class);
|
entityInfoCreator.getEntityInformation(String.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user