import static org.junit.Assert.assertTrue;
import java.io.FileNotFoundException;
-
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.BeforeClass;
resourceConfig = resourceConfig.registerInstances(restConf, StructuredDataToXmlProvider.INSTANCE,
StructuredDataToJsonProvider.INSTANCE, XmlToCompositeNodeProvider.INSTANCE,
JsonToCompositeNodeProvider.INSTANCE);
- resourceConfig.registerClasses( RestconfDocumentedExceptionMapper.class );
+ resourceConfig.registerClasses(RestconfDocumentedExceptionMapper.class);
return resourceConfig;
}
Response response = target("/config/number:cont").request(MediaType.APPLICATION_XML).put(
Entity.entity("<cont xmlns=\"number\"><lf>3f</lf></cont>", MediaType.APPLICATION_XML));
String exceptionMessage = response.readEntity(String.class);
- assertTrue(exceptionMessage.contains("Incorrect lexical representation of Integer value: 3f"));
+ assertTrue(exceptionMessage.contains("invalid-value"));
}
}
\ No newline at end of file