use of org.wso2.msf4j.formparam.FileInfo in project carbon-apimgt by wso2.
the class ApisApiServiceImplTestCase method testApisApiIdWsdlPutUnsupported.
@Test
public void testApisApiIdWsdlPutUnsupported() throws Exception {
printTestMethodName();
File file = new File(getClass().getClassLoader().getResource("swagger.json").getFile());
FileInputStream fileInputStream = new FileInputStream(file);
FileInfo fileInfo = new FileInfo();
fileInfo.setFileName("swagger.json");
ApisApiServiceImpl apisApiService = new ApisApiServiceImpl();
powerMockDefaultAPIPublisher();
API api = SampleTestObjectCreator.createDefaultAPI().build();
Response response = apisApiService.apisApiIdWsdlPut(api.getId(), fileInputStream, fileInfo, null, null, getRequest());
fileInputStream.close();
assertEquals(response.getStatus(), 400);
}
Aggregations