stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isu...@apache.org
Subject git commit: tests for parsing Applications
Date Sun, 12 Oct 2014 14:00:47 GMT
Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping a0f91a208 -> 0403bc8ea


tests for parsing Applications


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0403bc8e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0403bc8e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0403bc8e

Branch: refs/heads/4.0.0-grouping
Commit: 0403bc8eaf9aa03b0aefc6d34f053dec1a208011
Parents: a0f91a2
Author: Isuru Haththotuwa <isuruh@apache.org>
Authored: Sun Oct 12 19:30:27 2014 +0530
Committer: Isuru Haththotuwa <isuruh@apache.org>
Committed: Sun Oct 12 19:30:27 2014 +0530

----------------------------------------------------------------------
 .../CompositeApplicationParseTest.java          | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/0403bc8e/components/org.apache.stratos.cloud.controller/src/test/java/org/apache/stratos/cloud/controller/application/CompositeApplicationParseTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/test/java/org/apache/stratos/cloud/controller/application/CompositeApplicationParseTest.java
b/components/org.apache.stratos.cloud.controller/src/test/java/org/apache/stratos/cloud/controller/application/CompositeApplicationParseTest.java
index a2dc30a..1859c72 100644
--- a/components/org.apache.stratos.cloud.controller/src/test/java/org/apache/stratos/cloud/controller/application/CompositeApplicationParseTest.java
+++ b/components/org.apache.stratos.cloud.controller/src/test/java/org/apache/stratos/cloud/controller/application/CompositeApplicationParseTest.java
@@ -101,6 +101,31 @@ public class CompositeApplicationParseTest {
     }
 
     @Test(expected = ApplicationDefinitionException.class)
+    public void testParseSimpleApplicationWithNullAppId () throws ApplicationDefinitionException
{
+
+        ApplicationParser applicationParser = new DefaultApplicationParser();
+        ApplicationContext simpleAppCtxt = new ApplicationContext();
+        // no app id
+        simpleAppCtxt.setAlias("simpleAppAlias");
+
+        // parse
+        applicationParser.parse(simpleAppCtxt);
+    }
+
+    @Test(expected = ApplicationDefinitionException.class)
+    public void testParseSimpleApplicationWithEmptyAppId () throws ApplicationDefinitionException
{
+
+        ApplicationParser applicationParser = new DefaultApplicationParser();
+        ApplicationContext simpleAppCtxt = new ApplicationContext();
+        // empty app id
+        simpleAppCtxt.setApplicationId("");
+        simpleAppCtxt.setAlias("simpleAppAlias");
+
+        // parse
+        applicationParser.parse(simpleAppCtxt);
+    }
+
+    @Test(expected = ApplicationDefinitionException.class)
     public void testParseSimpleApplicationWithInvalidCartridge() throws ApplicationDefinitionException
{
 
         ApplicationParser applicationParser = new DefaultApplicationParser();


Mime
View raw message