Examples of addNewInterface()


Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

public class WadlImporterTestCase extends TestCase
{
  public void testWadlImporter() throws Exception
  {
    WsdlProject project = new WsdlProject();
    RestService service = ( RestService )project.addNewInterface( "REST Service", RestServiceFactory.REST_TYPE );
    WadlImporter importer = new WadlImporter( service );
    importer.initFromWadl( WadlImporter.class.getResource( "/wadl/YahooSearch.wadl" ).toString() );
    assertEquals( service.getName(), "REST Service" );
    assertEquals( 1, service.getResourceList().size() );
    assertEquals( 0, service.getResourceList().get( 0 ).getChildResourceCount() );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

  }

  public void testImportWadl() throws Exception
  {
    WsdlProject project = new WsdlProject();
    RestService service = ( RestService )project.addNewInterface( "Test", RestServiceFactory.REST_TYPE );

    new WadlImporter( service ).initFromWadl( new File( "src" + File.separatorChar + "test-resources"
        + File.separatorChar + "wadl" + File.separatorChar + "YahooSearch.wadl" ).toURI().toURL().toString() );

    assertEquals( 1, service.getOperationCount() );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

public class RestResourceTestCase extends TestCase
{
  public void testGetTemplateParams() throws Exception
  {
    WsdlProject project = new WsdlProject();
    RestService restService = ( RestService )project.addNewInterface( "Test", RestServiceFactory.REST_TYPE );
    RestResource resource = restService.addNewResource( "Resource", "/test" );

    assertEquals( resource.getDefaultParams().length, 0 );

    resource.setPath( "/{id}/test" );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

    @Test
    public void resourceIsFoundEvenThoughMultipleInterfacesWithDuplicateNameExists() throws RestRequestStepFactory.ItemDeletedException, XmlException, IOException, SoapUIException {
        WsdlTestCase testCase = Mockito.mock(WsdlTestCase.class);
        WsdlProject project = new WsdlProject();
        RestService restService1 = (RestService) project
                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestService restService2 = (RestService) project
                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestResource restResource = restService2.addNewResource(RESOURCE_NAME, PATH);
        restResource.addNewMethod(METHOD_NAME);
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

    public void resourceIsFoundEvenThoughMultipleInterfacesWithDuplicateNameExists() throws RestRequestStepFactory.ItemDeletedException, XmlException, IOException, SoapUIException {
        WsdlTestCase testCase = Mockito.mock(WsdlTestCase.class);
        WsdlProject project = new WsdlProject();
        RestService restService1 = (RestService) project
                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestService restService2 = (RestService) project
                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestResource restResource = restService2.addNewResource(RESOURCE_NAME, PATH);
        restResource.addNewMethod(METHOD_NAME);
        Mockito.when(testCase.getParent()).thenReturn(project);
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

    }

    private WsdlProject createNewProjectWithRESTInterface() throws XmlException, IOException, SoapUIException {
        WsdlProject project = new WsdlProject();

        RestService restService = (RestService) project.addNewInterface("Test", RestServiceFactory.REST_TYPE);
        restService.addNewResource("Resource", "/test");
        return project;
    }
}
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

    RestResource restResource;

    @Before
    public void setUp() throws XmlException, IOException, SoapUIException {
        WsdlProject project = new WsdlProject();
        restService = (RestService) project.addNewInterface("Test", RestServiceFactory.REST_TYPE);
        restResource = restService.addNewResource("Resource", "/test");
    }

    @Test
    public void deletingResourceDeletesAllChildResources() throws Exception {
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

public class WadlImporterTest {

    @Test
    public void testWadlImporter() throws Exception {
        WsdlProject project = new WsdlProject();
        RestService service = (RestService) project.addNewInterface("REST Service", RestServiceFactory.REST_TYPE);
        WadlImporter importer = new WadlImporter(service);
        importer.initFromWadl(WadlImporter.class.getResource("/wadl/YahooSearch.wadl").toString());
        assertEquals(service.getName(), "REST Service");
        assertEquals(1, service.getResourceList().size());
        assertEquals(0, service.getResourceList().get(0).getChildResourceCount());
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

    }

    @Test
    public void importsWadl() throws Exception {
        WsdlProject project = new WsdlProject();
        RestService service = (RestService) project.addNewInterface("Test", RestServiceFactory.REST_TYPE);

        new WadlImporter(service).initFromWadl(RestUtilsTest.class.getResource("/wadl/YahooSearch.wadl").toURI().toString());

        assertEquals(1, service.getOperationCount());
        assertEquals("/NewsSearchService/V1/", service.getBasePath());
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlProject.addNewInterface()

    }

    @Test
    public void removesPropertyExpansions() throws Exception {
        WsdlProject project = new WsdlProject();
        RestService service = (RestService) project.addNewInterface("Test", RestServiceFactory.REST_TYPE);

        new WadlImporter(service).initFromWadl(RestUtilsTest.class.getResource(
                "/wadl/YahooSearchWithExpansions.wadl").toURI().toString());
        RestResource operation = (RestResource) service.getAllOperations()[0];
        RestMethod restMethod = operation.getRestMethodAt(0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.