Examples of PactFragment


Examples of au.com.dius.pact.model.PactFragment

            existing.interactions.add(currentInteraction);
        }

        public PactFragment toFragment() {
            addInteraction();
            return new PactFragment(
                    existing.consumer,
                    existing.provider,
                    JavaConverters$.MODULE$.asScalaBufferConverter(existing.interactions).asScala());
        }
View Full Code Here

Examples of au.com.dius.pact.model.PactFragment

    protected abstract void runTest(String url);

    @Test
    public void testPact() {
        PactFragment fragment = createFragment(ConsumerPactBuilder.consumer(consumerName()).hasPactWith(providerName()));
        final MockProviderConfig config = MockProviderConfig.createDefault();

        VerificationResult result = fragment.runConsumer(config, new TestRun() {
            public void run(MockProviderConfig config) {
                try {
                    runTest(config.url());
                } catch(Exception e) {
                    fail("error thrown: "+e);
View Full Code Here

Examples of au.com.dius.pact.model.PactFragment

    protected abstract void runTest(String endpoint);

    @Test
    public void testPact() {
        PactFragment fragment = createFragment(ConsumerPactBuilder.consumer(consumerName()).hasPactWith(providerName()));

        Integer port = (Integer) MockProviderConfig.randomPort().get();
        final MockProviderConfig config = new MockProviderConfig(port, "localhost");

        PactVerification.VerificationResult result = fragment.runConsumer(config,
                new Runnable() {
                    public void run() {
                        try {
                            runTest(config.url());
                        } catch(Exception e) {
View Full Code Here

Examples of au.com.dius.pact.model.PactFragment

    protected abstract void runTest(String url);

    @Test
    public void testPact() {
        PactFragment fragment = createFragment(ConsumerPactBuilder.consumer(consumerName()).hasPactWith(providerName()));
        final MockProviderConfig config = MockProviderConfig.createDefault();

        VerificationResult result = fragment.runConsumer(config, new TestRun() {
            public void run(MockProviderConfig config) {
                try {
                    runTest(config.url());
                } catch(Exception e) {
                    fail("error thrown: "+e);
View Full Code Here

Examples of au.com.dius.pact.model.PactFragment

    protected abstract void runTest(String url);

    @Test
    public void testPact() {
        PactFragment fragment = createFragment(ConsumerPactBuilder.consumer(consumerName()).hasPactWith(providerName()));
        final MockProviderConfig config = MockProviderConfig.createDefault();

        VerificationResult result = fragment.runConsumer(config, new Runnable() {
            public void run() {
                try {
                    runTest(config.url());
                } catch(Exception e) {
                    fail("error thrown: "+e);
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.