8af87ddbd1cdd01a42f7b7d2b0b15c7f85beaf0f
[policy/apex-pdp.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events;
22
23 import static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertNotNull;
25
26 import org.junit.Test;
27
28 /**
29  * Test the OutputEvent class.
30  *
31  */
32 public class OutputEventTest {
33
34     @Test
35     public 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 }