Package org.projectodd.polyglot.test.as

Examples of org.projectodd.polyglot.test.as.MockDeploymentUnit


        RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name");

        rubyAppMetaData.setRoot( this.root );

        MockDeploymentPhaseContext phaseContext = createPhaseContext();
        MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();
       
        RubyRuntimeMetaData existingRuntimeMD = new RubyRuntimeMetaData();
        existingRuntimeMD.setRuntimeType( RubyRuntimeMetaData.RuntimeType.RACK );

        unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, existingRuntimeMD );
        rubyAppMetaData.attachTo( unit );
       
        deploy( phaseContext );

        RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );
        assertNotNull( runtimeMetaData );
        assertEquals( existingRuntimeMD, runtimeMetaData );
        assertNull( runtimeMetaData.getBaseDir() );
        assertEquals( RubyRuntimeMetaData.RuntimeType.RACK, runtimeMetaData.getRuntimeType() );
    }
View Full Code Here


        appendDeployer( new QueuesYamlParsingProcessor() );
    }

    @Test
    public void testEmptyYaml() throws Exception {
        MockDeploymentUnit unit = deployResourceAs( "empty.yml", "queues.yml" );

        List<QueueMetaData> allMetaData = unit.getAttachmentList( QueueMetaData.ATTACHMENTS_KEY );
        assertTrue( allMetaData.isEmpty() );
    }
View Full Code Here

        assertTrue( allMetaData.isEmpty() );
    }

    @Test(expected = DeploymentUnitProcessingException.class)
    public void testJunkYaml() throws Exception {
        MockDeploymentUnit unit = deployResourceAs( "junk-queues.yml", "queues.yml" );

        List<QueueMetaData> allMetaData = unit.getAttachmentList( QueueMetaData.ATTACHMENTS_KEY );
        assertTrue( allMetaData.isEmpty() );
    }
View Full Code Here

        assertTrue( allMetaData.isEmpty() );
    }

    @Test
    public void testValidYaml() throws Exception {
        MockDeploymentUnit unit = deployResourceAs( "valid-queues.yml", "queues.yml" );

        List<QueueMetaData> allMetaData = unit.getAttachmentList( QueueMetaData.ATTACHMENTS_KEY );

        assertEquals( 2, allMetaData.size() );

        QueueMetaData queueFoo = getMetaData( allMetaData, "/queues/foo" );
        assertNotNull( queueFoo );
View Full Code Here

        clearDeployers();
        appendDeployer( new AppKnobYamlParsingProcessor() );
        appendDeployer( new QueuesYamlParsingProcessor() );

        MockDeploymentUnit unit = deployResourceAs( "rootless-queues-knob.yml", "rootless-queues-knob.yml" );
        List<QueueMetaData> allMetaData = unit.getAttachmentList( QueueMetaData.ATTACHMENTS_KEY );

        assertEquals( 3, allMetaData.size() );

        QueueMetaData queueItchy = getMetaData( allMetaData, "/queues/itchy" );
        assertNotNull( queueItchy );
View Full Code Here

       
    }

    @Test
    public void testTorqueBoxYml() throws Exception {
        MockDeploymentUnit unit = deployResourceAsTorqueboxYml( "valid-torquebox.yml" );

        List<QueueMetaData> allMetaData = unit.getAttachmentList( QueueMetaData.ATTACHMENTS_KEY );

        assertEquals( 3, allMetaData.size() );

        QueueMetaData queueFoo = getMetaData( allMetaData, "/queues/tbyaml/foo" );
        assertNotNull( queueFoo );
View Full Code Here

    }

    @Test
    public void testDestinationDurability() throws Exception {

        MockDeploymentUnit unit = deployResourceAsTorqueboxYml( "valid-torquebox.yml" );

        List<QueueMetaData> allMetaData = unit.getAttachmentList( QueueMetaData.ATTACHMENTS_KEY );

        assertEquals( 3, allMetaData.size() );

        // /queues/tbyaml/foo has no durability flag set, we should default to
        // durable
View Full Code Here

        appendDeployer( new TopicsYamlParsingProcessor()  );
    }

    @Test
    public void testEmptyYaml() throws Exception {
        MockDeploymentUnit unit = deployResourceAs( "empty.yml", "topics.yml" );
       
        List<TopicMetaData> allMetaData = unit.getAttachmentList( TopicMetaData.ATTACHMENTS_KEY );
        assertTrue( allMetaData.isEmpty() );
    }
View Full Code Here

        assertTrue( allMetaData.isEmpty() );
    }

    @Test(expected=DeploymentUnitProcessingException.class)
    public void testJunkYaml() throws Exception {
        MockDeploymentUnit unit = deployResourceAs( "junk-topics.yml", "topics.yml" );
       
        List<TopicMetaData> allMetaData = unit.getAttachmentList( TopicMetaData.ATTACHMENTS_KEY );
        assertTrue( allMetaData.isEmpty() );
    }
View Full Code Here

        clearDeployers();
        appendDeployer( new AppKnobYamlParsingProcessor() );
        appendDeployer( new TopicsYamlParsingProcessor() );

        MockDeploymentUnit unit = deployResourceAs( "rootless-topics-knob.yml", "rootless-topics-knob.yml" );
        List<TopicMetaData> allMetaData = unit.getAttachmentList( TopicMetaData.ATTACHMENTS_KEY );

        assertEquals( 3, allMetaData.size() );

        TopicMetaData topicWorker = getMetaData( allMetaData, "/topics/worker" );
        assertNotNull( topicWorker );
View Full Code Here

TOP

Related Classes of org.projectodd.polyglot.test.as.MockDeploymentUnit

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.