You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/03/16 10:06:37 UTC

[48/50] [abbrv] git commit: [OLINGO-189] Add additional tests

[OLINGO-189] Add additional tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/commit/35022c42
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/tree/35022c42
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/diff/35022c42

Branch: refs/heads/Olingo-129_PocJpaDataStore
Commit: 35022c4294f23e3d9499884c4b60916024be4018
Parents: e772690
Author: Michael Bolz <mi...@apache.org>
Authored: Fri Mar 14 06:23:06 2014 +0100
Committer: Michael Bolz <mi...@apache.org>
Committed: Fri Mar 14 06:23:06 2014 +0100

----------------------------------------------------------------------
 .../odata2/core/exception/ODataExceptionTest.java    | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/35022c42/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
index 6127605..6d97d15 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
@@ -18,9 +18,6 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.core.exception;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import org.apache.olingo.odata2.api.edm.EdmException;
 import org.apache.olingo.odata2.api.edm.EdmLiteralException;
 import org.apache.olingo.odata2.api.edm.EdmSimpleTypeException;
@@ -51,6 +48,10 @@ import org.apache.olingo.odata2.testutil.fit.BaseTest;
 import org.apache.olingo.odata2.testutil.helper.ODataMessageTextVerifier;
 import org.junit.Test;
 
+import java.util.Locale;
+
+import static org.junit.Assert.*;
+
 /**
  *  
  */
@@ -69,6 +70,14 @@ public class ODataExceptionTest extends BaseTest {
   }
 
   @Test
+  public void getMessage() {
+    ODataNotImplementedException odnie = new ODataNotImplementedException();
+    assertNotNull(odnie.getMessage());
+    MessageService.Message commonMsg = MessageService.getMessage(Locale.ENGLISH, ODataNotImplementedException.COMMON);
+    assertEquals(commonMsg.getText(), odnie.getMessage());
+  }
+
+  @Test
   public void oDataContextedCause() {
     ODataException exception =
         new ODataException("Some message.", new ODataNotFoundException(ODataNotFoundException.ENTITY));