2 * Copyright © 2020 Orange. 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
9 package org.opendaylight.transportpce.common.mapping;
11 import static org.junit.jupiter.api.Assertions.assertEquals;
12 import static org.mockito.Mockito.mock;
13 import static org.mockito.Mockito.when;
15 import org.junit.jupiter.api.Test;
16 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.Port;
18 public class SortPort221ByNameTest {
22 Port port1 = mock(Port.class);
23 Port port2 = mock(Port.class);
24 when(port1.getPortName()).thenReturn("port1");
25 when(port2.getPortName()).thenReturn("port2");
26 SortPort221ByName sortPort221ByName = new SortPort221ByName();
27 assertEquals(sortPort221ByName.compare(port2, port1), 1);