import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.opendaylight.protocol.pcep.spi.PCEPErrorMapping.PCEPErrorIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.close.object.CCloseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Object;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.close.object.CCloseBuilder;
public class APITest {
assertNull(header.isProcessingRule());
assertEquals(new ObjectHeaderImpl(null, true).hashCode(), header.hashCode());
- assertTrue(new ObjectHeaderImpl(null, true).equals(header));
+ assertEquals(new ObjectHeaderImpl(null, true), header);
}
@Test
assertFalse(un.isIgnore());
assertFalse(un.isProcessingRule());
assertEquals(PCEPErrors.CT_AND_SETUP_PRIORITY_DO_NOT_FORM_TE_CLASS, un.getError());
- final PCEPErrorMapping mapping = PCEPErrorMapping.getInstance();
- final PCEPErrorIdentifier id = mapping.getFromErrorsEnum(PCEPErrors.CT_AND_SETUP_PRIORITY_DO_NOT_FORM_TE_CLASS);
- assertEquals(id.getType(), un.getErrors().get(0).getErrorObject().getType().shortValue());
+ assertEquals(PCEPErrors.CT_AND_SETUP_PRIORITY_DO_NOT_FORM_TE_CLASS.getErrorType(), un.getErrors().get(0).getErrorObject().getType().shortValue());
final Object o = new CCloseBuilder().build();
UnknownObject unknown = new UnknownObject(PCEPErrors.LSP_RSVP_ERROR, o);