[OLINGO-348] Rename test bundle to avoid name clash with root bundle

This commit is contained in:
Christian Amend 2014-07-24 10:35:17 +02:00
parent 327873253c
commit e0b787e3dd
3 changed files with 8 additions and 6 deletions

View File

@ -130,11 +130,12 @@ public class TranslatedExceptionsTest {
@Test
public void keyForRootBundleButNotPresentInDerivedBundle() {
ODataTranslatedException exp = new ODataTranslatedException(DEV, ONEPARAM, "param1");
ODataTranslatedException exp =
new ODataTranslatedException(DEV, ODataTranslatedException.HTTP_METHOD_NOT_IMPLEMENTED, "param1");
assertEquals(DEV, exp.getMessage());
ODataErrorMessage translatedMessage = exp.getTranslatedMessage(Locale.GERMAN);
assertNotNull(translatedMessage);
assertEquals("Param1: param1", translatedMessage.getMessage());
assertEquals("Invalid http method given: 'param1'.", translatedMessage.getMessage());
}
}

View File

@ -38,6 +38,7 @@ import org.apache.olingo.server.api.serializer.ODataSerializer;
import org.apache.olingo.server.api.serializer.ODataSerializerException;
import org.apache.olingo.server.tecsvc.data.DataProvider;
import org.apache.olingo.server.tecsvc.provider.EdmTechProvider;
import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
@ -117,9 +118,9 @@ public class ODataJsonSerializerTest {
Assert.fail("Expected exception not thrown!");
} catch (final ODataSerializerException e) {
Assert.assertEquals(ODataSerializerException.WRONG_PROPERTY_VALUE, e.getMessageKey());
// final String message = e.getLocalizedMessage();
// Assert.assertThat(message, CoreMatchers.containsString("PropertyInt16"));
// Assert.assertThat(message, CoreMatchers.containsString("false"));
final String message = e.getLocalizedMessage();
Assert.assertThat(message, CoreMatchers.containsString("PropertyInt16"));
Assert.assertThat(message, CoreMatchers.containsString("false"));
}
}