2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.sdnc.northbound.dataChange;
24 public class TestDataChange {//extends AbstractConcurrentDataBrokerTest {
26 // private DataChangeProvider dataChangeProvider;
27 // private static final Logger LOG = LoggerFactory.getLogger(DataChangeProvider.class);
30 // public void setUp() throws Exception {
31 // if (null == dataChangeProvider) {
32 // DataBroker dataBroker = getDataBroker();
33 // NotificationPublishService mockNotification = mock(NotificationPublishService.class);
34 // RpcProviderService mockRpcRegistry = mock(RpcProviderService.class);
35 // DataChangeClient mockSliClient = mock(DataChangeClient.class);
36 // dataChangeProvider = new DataChangeProvider(dataBroker, mockNotification, mockRpcRegistry, mockSliClient);
40 // //Testcase should return error 503 when No service logic active for dataChange.
42 // public void testDataChangeNotification() {
44 // DataChangeNotificationInputBuilder inputBuilder = new DataChangeNotificationInputBuilder();
46 // inputBuilder.setAaiEventId("1");
49 // // TODO: currently initialize SvcLogicServiceClient is failing, need to fix
50 // java.util.concurrent.Future<RpcResult<DataChangeNotificationOutput>> future = dataChangeProvider
51 // .dataChangeNotification(inputBuilder.build());
52 // RpcResult<DataChangeNotificationOutput> rpcResult = null;
54 // rpcResult = future.get();
55 // } catch (Exception e) {
56 // fail("Error : " + e);
58 // LOG.info("result: {}", rpcResult);
59 // assertEquals("503", rpcResult.getResult().getDataChangeResponseCode());
62 // //Input parameter validation
64 // public void testDataChangeNotificationInputValidation() {
66 // java.util.concurrent.Future<RpcResult<DataChangeNotificationOutput>> future = dataChangeProvider
67 // .dataChangeNotification(null);
68 // RpcResult<DataChangeNotificationOutput> rpcResult = null;
70 // rpcResult = future.get();
71 // } catch (Exception e) {
72 // fail("Error : " + e);
74 // LOG.info("result: {}", rpcResult);
75 // assertEquals("403", rpcResult.getResult().getDataChangeResponseCode());