adding some pce unit tests and remove ignore from olm class
[transportpce.git] / pce / src / test / java / org / opendaylight / transportpce / pce / service / PathComputationServiceImplTest.java
1 /*
2  * Copyright © 2020 Orange Labs, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.pce.utils.service;
9
10 import org.junit.Assert;
11 import org.junit.Before;
12 import org.junit.Test;
13 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
14 import org.opendaylight.transportpce.common.network.RequestProcessor;
15 import org.opendaylight.transportpce.pce.service.PathComputationServiceImpl;
16 import org.opendaylight.transportpce.pce.utils.PceTestData;
17 import org.opendaylight.transportpce.test.AbstractTest;
18
19 public class PathComputationServiceImplTest extends AbstractTest {
20
21     private PathComputationServiceImpl pathComputationServiceImpl;
22
23     @Before
24     public void setUp() {
25         pathComputationServiceImpl = new PathComputationServiceImpl(
26                 new NetworkTransactionImpl(new RequestProcessor(this.getDataBroker())),
27                 this.getNotificationPublishService());
28         pathComputationServiceImpl.init();
29     }
30
31     @Test
32     public void pathComputationRequestTest() {
33         Assert.assertNotNull(pathComputationServiceImpl.pathComputationRequest(PceTestData.getPCERequest()));
34         pathComputationServiceImpl.close();
35     }
36 }