DATAES-46 - Apply code formatting

This commit is contained in:
Mohsin Husen 2014-08-09 15:14:37 +01:00
parent 705adf25f2
commit cf54ba4e8f

View File

@ -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");
* 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)
public class ElasticsearchEntityInformationCreatorImplTest {
@Mock
private MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext;
@Mock
private ElasticsearchPersistentEntity<String> persistentEntity;
private ElasticsearchEntityInformationCreatorImpl entityInfoCreator;
@Before
public void before() {
entityInfoCreator = new ElasticsearchEntityInformationCreatorImpl(mappingContext);
}
@Test(expected = IllegalArgumentException.class)
public void shouldThrowIllegalArgumentExceptionOnMissingEntity() {
entityInfoCreator.getEntityInformation(String.class);
}
@Test(expected = IllegalArgumentException.class)
public void shouldThrowIllegalArgumentExceptionOnMissingIdAnnotation() {
doReturn(persistentEntity).when(mappingContext).getPersistentEntity(String.class);
doReturn(String.class).when(persistentEntity).getType();
doReturn(null).when(persistentEntity).getIdProperty();
entityInfoCreator.getEntityInformation(String.class);
}
@Mock
private MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext;
@Mock
private ElasticsearchPersistentEntity<String> persistentEntity;
private ElasticsearchEntityInformationCreatorImpl entityInfoCreator;
@Before
public void before() {
entityInfoCreator = new ElasticsearchEntityInformationCreatorImpl(mappingContext);
}
@Test(expected = IllegalArgumentException.class)
public void shouldThrowIllegalArgumentExceptionOnMissingEntity() {
entityInfoCreator.getEntityInformation(String.class);
}
@Test(expected = IllegalArgumentException.class)
public void shouldThrowIllegalArgumentExceptionOnMissingIdAnnotation() {
doReturn(persistentEntity).when(mappingContext).getPersistentEntity(String.class);
doReturn(String.class).when(persistentEntity).getType();
doReturn(null).when(persistentEntity).getIdProperty();
entityInfoCreator.getEntityInformation(String.class);
}
}