X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=nbinotifications%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fnbinotifications%2Fserialization%2FNotificationServiceDeserializerTest.java;h=fc987fb87f3d7f5cc7f728f4e91298b3c4e4096b;hb=942384f299eecdf5163014ff7930b12ce26a2ca3;hp=928c2471a200594a984121b6252ec259ea8be82c;hpb=de218a942bf32f32e41d37b1f49f9a35e86d5dc0;p=transportpce.git diff --git a/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationServiceDeserializerTest.java b/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationServiceDeserializerTest.java index 928c2471a..fc987fb87 100644 --- a/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationServiceDeserializerTest.java +++ b/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationServiceDeserializerTest.java @@ -7,29 +7,31 @@ */ package org.opendaylight.transportpce.nbinotifications.serialization; -import static org.junit.Assert.assertEquals; + +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Map; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.opendaylight.transportpce.common.converter.JsonStringConverter; import org.opendaylight.transportpce.test.AbstractTest; -import org.opendaylight.yang.gen.v1.nbi.notifications.rev201130.get.notifications.service.output.NotificationService; +import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.NotificationProcessService; +import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.get.notifications.process.service.output.NotificationsProcessService; public class NotificationServiceDeserializerTest extends AbstractTest { @Test - public void deserializeTest() throws IOException { - JsonStringConverter converter = - new JsonStringConverter<>(getDataStoreContextUtil().getBindingDOMCodecServices()); + void deserializeTest() throws IOException { + JsonStringConverter converter = new JsonStringConverter<>( + getDataStoreContextUtil().getBindingDOMCodecServices()); NotificationServiceDeserializer deserializer = new NotificationServiceDeserializer(); Map configs = Map.of(ConfigConstants.CONVERTER, converter); deserializer.configure(configs, false); - NotificationService readEvent = deserializer.deserialize("Test", + NotificationsProcessService readEvent = deserializer.deserialize("Test", Files.readAllBytes(Paths.get("src/test/resources/event.json"))); deserializer.close(); - assertEquals("Service name should be service1", "service1", readEvent.getServiceName()); + assertEquals("service1", readEvent.getServiceName(), "Service name should be service1"); } }