Tests for appc-inbound/design-services 51/56451/10
authorDilip kumar Pampana <dilip.kumar.pampana@ibm.com>
Sat, 14 Jul 2018 20:18:51 +0000 (16:18 -0400)
committerDilip kumar Pampana <dilip.kumar.pampana@ibm.com>
Mon, 16 Jul 2018 18:49:01 +0000 (18:49 +0000)
Test coverage for GetAppcTimestampUTC in inound/ design-services

Issue-ID: APPC-1078
Change-Id: I508c3bcebad5c7c35bd2257436ad3f4099eb8345
Signed-off-by: Dilip kumar Pampana <dilip.kumar.pampana@ibm.com>
appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/validator/TestDBService.java

index 476dd0a..071c4b2 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Copyright (C) 2018 IBM
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,6 +25,8 @@
 
 package org.onap.appc.design.validator;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -238,4 +242,12 @@ public class TestDBService {
         } catch (Exception e) {
         }
     }
+    @Test
+    public void testGetAppcTimestampUTC() throws Exception {
+             String requestId = "1234";
+             DesignDBService design = DesignDBService.initialise();
+             String result =  Whitebox.invokeMethod(design, "getAppcTimestampUTC",requestId);
+             assertTrue(result.endsWith("Z"));
+    }
+
 }