2 * Copyright © 2018 Orange, Inc. and others. All rights reserved.
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
8 package org.opendaylight.transportpce.servicehandler;
10 import static org.junit.Assert.assertEquals;
11 import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildHardConstraintWithCoRouting;
12 import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildSoftConstraintWithCoRouting;
14 import org.junit.Test;
15 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
16 import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
19 * Class to test downgrading and updating Constraints .
21 * @author Ahmed Helmy ( ahmad.helmy@orange.com )
24 public class DowngradeConstraintsTest {
29 public void testUpdateSoftConstraintsBothCoRouting() {
30 HardConstraints initialHardConstraints = buildHardConstraintWithCoRouting();
31 SoftConstraints initialSoftConstraints = buildSoftConstraintWithCoRouting();
32 SoftConstraints generatedSoftConstraints = DowngradeConstraints.updateSoftConstraints(
33 initialHardConstraints, initialSoftConstraints);
35 generatedSoftConstraints.getCustomerCode().get(0),
36 initialHardConstraints.getCustomerCode().get(0));