2 * ============LICENSE_START=======================================================
3 * dcaegen2-collectors-veshv
4 * ================================================================================
5 * Copyright (C) 2018 NOKIA
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.dcae.collectors.veshv.ves.message.generator.impl
22 import javax.json.Json
24 private const val validMessageParameters =
27 "commonEventHeader": {
28 "version": "sample-version",
32 "eventId": "sample-event-id",
33 "eventName": "sample-event-name",
34 "eventType": "sample-event-type",
35 "startEpochMicrosec": 120034455,
36 "lastEpochMicrosec": 120034455,
37 "nfNamingCode": "sample-nf-naming-code",
38 "nfcNamingCode": "sample-nfc-naming-code",
39 "reportingEntityId": "sample-reporting-entity-id",
40 "reportingEntityName": "sample-reporting-entity-name",
41 "sourceId": "sample-source-id",
42 "sourceName": "sample-source-name",
43 "vesEventListenerVersion": "another-version"
45 "messageType": "VALID",
46 "messagesAmount": 25000
49 "commonEventHeader": {
50 "version": "sample-version",
54 "eventId": "sample-event-id",
55 "eventName": "sample-event-name",
56 "eventType": "sample-event-type",
57 "startEpochMicrosec": 120034455,
58 "lastEpochMicrosec": 120034455,
59 "nfNamingCode": "sample-nf-naming-code",
60 "nfcNamingCode": "sample-nfc-naming-code",
61 "reportingEntityId": "sample-reporting-entity-id",
62 "reportingEntityName": "sample-reporting-entity-name",
63 "sourceId": "sample-source-id",
64 "sourceName": "sample-source-name",
65 "vesEventListenerVersion": "another-version"
67 "messageType": "TOO_BIG_PAYLOAD",
73 private const val invalidMessageParameters =
77 "commonEventHeader": {
78 "version": "sample-version",
82 "eventId": "sample-event-id",
83 "eventName": "sample-event-name",
84 "eventType": "sample-event-type",
85 "startEpochMicrosec": 120034455,
86 "lastEpochMicrosec": 120034455,
87 "nfNamingCode": "sample-nf-naming-code",
88 "nfcNamingCode": "sample-nfc-naming-code",
89 "reportingEntityId": "sample-reporting-entity-id",
90 "reportingEntityName": "sample-reporting-entity-name",
91 "sourceId": "sample-source-id",
92 "sourceName": "sample-source-name",
93 "vesEventListenerVersion": "another-version"
100 fun validMessagesParametesJson() = Json
101 .createReader(validMessageParameters.reader())
104 fun invalidMessagesParametesJson() = Json
105 .createReader(invalidMessageParameters.reader())