X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=holmes-actions%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fholmes%2Fcommon%2Fmsb%2Fentity%2FNodeInfoTest.java;fp=holmes-actions%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fholmes%2Fcommon%2Fmsb%2Fentity%2FNodeInfoTest.java;h=9458dcf349acab80217f1bcaa44687871f83b55d;hb=ade480b317fe7bcf9ce94ef34e6c42b71a0ea1a3;hp=0000000000000000000000000000000000000000;hpb=86debb28ef983f8176da06258e8f09c8783cddc7;p=holmes%2Fcommon.git diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java new file mode 100644 index 0000000..9458dcf --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java @@ -0,0 +1,47 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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 + *

+ * 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.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import java.util.Date; + +import static org.junit.Assert.*; + +public class NodeInfoTest { + @Test + public void testGettersAndSetters() { + NodeInfo nodeInfo = new NodeInfo(); + nodeInfo.setNodeId("node-1"); + nodeInfo.setStatus("active"); + + Date expiration = new Date(); + nodeInfo.setExpiration(expiration); + + Date createdAt = new Date(); + nodeInfo.setCreated_at(createdAt); + + Date updatedAt = new Date(); + nodeInfo.setUpdated_at(updatedAt); + + assertEquals("node-1", nodeInfo.getNodeId()); + assertEquals("active", nodeInfo.getStatus()); + assertEquals(expiration, nodeInfo.getExpiration()); + assertEquals(createdAt, nodeInfo.getCreated_at()); + assertEquals(updatedAt, nodeInfo.getUpdated_at()); + } +} \ No newline at end of file