Merge "Integrate sdc-tosca parser jar"
[externalapi/nbi.git] / src / test / java / org / onap / nbi / apis / assertions / HubAssertions.java
1 /**
2  *     Copyright (c) 2018 Orange
3  *
4  *     Licensed under the Apache License, Version 2.0 (the "License");
5  *     you may not use this file except in compliance with the License.
6  *     You may obtain a copy of the License at
7  *
8  *         http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *     Unless required by applicable law or agreed to in writing, software
11  *     distributed under the License is distributed on an "AS IS" BASIS,
12  *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *     See the License for the specific language governing permissions and
14  *     limitations under the License.
15  */
16 package org.onap.nbi.apis.assertions;
17
18 import org.onap.nbi.apis.hub.model.Event;
19 import org.onap.nbi.apis.hub.model.EventType;
20 import org.onap.nbi.apis.hub.model.Subscription;
21
22 import java.util.Date;
23 import java.util.UUID;
24
25 public class HubAssertions {
26
27     public static Subscription createServiceOrderCreationSubscription(){
28         Subscription subscription = new Subscription();
29         subscription.setId("id");
30         subscription.setCallback("http://localhost:8080/test");
31         subscription.setQuery("eventType = ServiceOrderCreationNotification");
32         return subscription;
33     }
34
35     public static Subscription createServiceOrderStateChangeSubscription(){
36         Subscription subscription = new Subscription();
37         subscription.setId("id");
38         subscription.setCallback("http://localhost/test");
39         subscription.setQuery("eventType = ServiceOrderStateChangeNotification");
40         return subscription;
41     }
42
43     public static Subscription createServiceOrderItemStateChangeSubscription(){
44         Subscription subscription = new Subscription();
45         subscription.setId("id");
46         subscription.setCallback("http://localhost/test");
47         subscription.setQuery("eventType = ServiceOrderItemStateChangeNotification");
48         return subscription;
49     }
50
51     public static Event createFakeEvent() {
52         Event event = new Event();
53         event.setEventId(UUID.randomUUID().toString());
54         event.setEventDate(new Date());
55         event.setEventType(EventType.SERVICE_ORDER_CREATION.value());
56         return event;
57     }
58 }