Convert junit4 to junit5
[policy/apex-pdp.git] / testsuites / performance / performance-benchmark-test / src / test / java / org / onap / policy / apex / testsuites / performance / benchmark / eventgenerator / events / OutputEventTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2024 Nordix Foundation.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events;
23
24 import static org.junit.jupiter.api.Assertions.assertEquals;
25 import static org.junit.jupiter.api.Assertions.assertNotNull;
26
27 import org.junit.jupiter.api.Test;
28
29 /**
30  * Test the OutputEvent class.
31  */
32 class OutputEventTest {
33
34     @Test
35     void test() {
36         OutputEvent oe = new OutputEvent();
37         assertNotNull(oe);
38
39         oe.setTestMatchCaseSelected(32112);
40         assertEquals(32112, oe.getTestMatchCaseSelected());
41
42         oe.setTestMatchStateTime(34455778822L);
43         assertEquals(34455778822L, oe.getTestMatchStateTime());
44
45         oe.setTestEstablishCaseSelected(1321);
46         assertEquals(1321, oe.getTestEstablishCaseSelected());
47
48         oe.setTestEstablishStateTime(13445566778822L);
49         assertEquals(13445566778822L, oe.getTestEstablishStateTime());
50
51         oe.setTestDecideCaseSelected(321);
52         assertEquals(321, oe.getTestDecideCaseSelected());
53
54         oe.setTestDecideStateTime(3445566778822L);
55         assertEquals(3445566778822L, oe.getTestDecideStateTime());
56
57         oe.setTestActCaseSelected(332);
58         assertEquals(332, oe.getTestActCaseSelected());
59
60         oe.setTestActStateTime(34455667788L);
61         assertEquals(34455667788L, oe.getTestActStateTime());
62
63         oe.setTestReceviedTimestamp(134455667788222L);
64         assertEquals(134455667788222L, oe.getTestReceviedTimestamp());
65
66         oe.setTestSlogan("0-0: Whatever");
67         assertEquals(0, oe.findBatchNumber());
68         assertEquals(0, oe.findEventNumber());
69     }
70 }