Package com.gatehill.apibms.core.model

Examples of com.gatehill.apibms.core.model.MockServer


     * {@inheritDoc}
     */
    @Override
    public ExecutionInstance execute(File blueprintFile, MockFactory.BlueprintFormat format, String host, int port) throws ServiceException {
        final MockDefinition definition = mockFactory.createMock(blueprintFile, format);
        final MockServer server = serverService.start(definition, host, port);

        return new ExecutionInstance(server.getHost(), server.getPort(),
                definition.getEndpoints().toArray(new ResourceDefinition[definition.getEndpoints().size()]));
    }
View Full Code Here


        final File jsonAst = new File(ExecutionServiceTest.class.getResource("/api1.json").getPath());

        final MockDefinition mock = new MockDefinition();
        mock.getEndpoints().add(new ResourceDefinition());

        final MockServer server = new MockServer(ServerService.HOST_LOCALHOST, PORT);

        // mock behaviour
        when(mockFactory.createMock(any(File.class), any(MockFactory.BlueprintFormat.class)))
                .thenReturn(mock);
View Full Code Here

TOP

Related Classes of com.gatehill.apibms.core.model.MockServer

Copyright © 2018 www.massapicom. 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.