airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRAVATA-2728) Refactoring Experiment Catalog Implementation
Date Thu, 03 May 2018 21:17:00 GMT

    [ https://issues.apache.org/jira/browse/AIRAVATA-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463072#comment-16463072
] 

ASF GitHub Bot commented on AIRAVATA-2728:
------------------------------------------

machristie commented on a change in pull request #191: [AIRAVATA-2728] Refactoring Experiment
Catalog Implementation
URL: https://github.com/apache/airavata/pull/191#discussion_r185938161
 
 

 ##########
 File path: modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/GatewayRepositoryTest.java
 ##########
 @@ -0,0 +1,83 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.repositories.expcatalog;
+
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.registry.core.repositories.expcatalog.util.Initialize;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+
+public class GatewayRepositoryTest {
+
+    private static Initialize initialize;
+    private String testGatewayId = "testGateway";
+    GatewayRepository gatewayRepository;
+    private static final Logger logger = LoggerFactory.getLogger(GatewayRepositoryTest.class);
+
+    @Before
+    public void setUp() {
+        try {
+            initialize = new Initialize("expcatalog-derby.sql");
+            initialize.initializeDB();
+            gatewayRepository = new GatewayRepository();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        System.out.println("********** TEAR DOWN ************");
+        initialize.stopDerbyServer();
+    }
+
+    @Test
+    public void GatewayRepositoryTest() throws ApplicationSettingsException, RegistryException
{
+        Gateway gateway = new Gateway();
+        gateway.setGatewayId(testGatewayId);
+        gateway.setDomain("SEAGRID");
+        gateway.setEmailAddress("abc@d.com");
+
+        String gatewayId = gatewayRepository.addGateway(gateway);
+        assertEquals(testGatewayId, gatewayId);
+
+        gateway.setGatewayAdminFirstName("ABC");
 
 Review comment:
   Please check the other fields as well.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Refactoring Experiment Catalog Implementation
> ---------------------------------------------
>
>                 Key: AIRAVATA-2728
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2728
>             Project: Airavata
>          Issue Type: Improvement
>          Components: Registry API
>            Reporter: Sneha Tilak
>            Assignee: Sneha Tilak
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message