diff options
-rw-r--r-- | appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRuntimeContext.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRuntimeContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRuntimeContext.java index 87c545ee3..008577f81 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRuntimeContext.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRuntimeContext.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright 2018 TechMahindra *================================================================================= +* Modifications 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. * You may obtain a copy of the License at @@ -21,6 +23,8 @@ package org.onap.appc.domainmodel.lcm; import static org.junit.Assert.*; +import java.time.Instant; + import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -50,4 +54,39 @@ public class TestRuntimeContext { public void testToString_ContainsString() { assertTrue(runtimeContext.toString().contains("RuntimeContext{requestContext")); } + + @Test + public void testGetRequestContext() { + RequestContext requestContext= new RequestContext(); + runtimeContext.setRequestContext(requestContext); + assertEquals(requestContext, runtimeContext.getRequestContext()); + } + + @Test + public void testGetResponseContext() { + ResponseContext responseContext= new ResponseContext(); + runtimeContext.setResponseContext(responseContext); + assertEquals(responseContext, runtimeContext.getResponseContext()); + } + + @Test + public void testGetTimeStart() { + Instant instant= Instant.now(); + runtimeContext.setTimeStart(instant); + assertEquals(instant, runtimeContext.getTimeStart()); + } + + @Test + public void testGetVnfContext() { + VNFContext vnfContext= new VNFContext(); + runtimeContext.setVnfContext(vnfContext); + assertEquals(vnfContext, runtimeContext.getVnfContext()); + } + + @Test + public void testGetTransactionRecord() { + TransactionRecord transactionRecord= new TransactionRecord(); + runtimeContext.setTransactionRecord(transactionRecord); + assertEquals(transactionRecord, runtimeContext.getTransactionRecord()); + } } |