Package com.foreach.across.test.modules.module1

Examples of com.foreach.across.test.modules.module1.TestModule1


      return context;
    }

    @Bean
    public TestModule1 testModule1() {
      return new TestModule1();
    }
View Full Code Here


public class TestAcrossContext
{
  @Test
  public void getModuleByName() {
    TestModule1 module = new TestModule1();
    ExposingModule other = new ExposingModule( "my module" );

    AcrossContext context = new AcrossContext();
    context.addModule( module );
    context.addModule( other );

    assertNull( context.getModule( "not present" ) );
    assertSame( module, context.getModule( module.getName() ) );
    assertSame( other, context.getModule( "my module" ) );
    assertSame( other, context.getModule( "com.foreach.across.test.modules.exposing.ExposingModule" ) );
  }
View Full Code Here

  @Test
  public void moduleWithTheSameNameIsNotAllowedWhenBootstrapping() {
    AcrossContext context = new AcrossContext();
    context.setInstallerAction( InstallerAction.DISABLED );

    TestModule1 module = new TestModule1();
    context.addModule( module );
    context.addModule( new TestModule2() );
    context.addModule( new ExposingModule( module.getName() ) );

    boolean failed = false;

    try {
      context.bootstrap();
View Full Code Here

  @Test
  public void dataSourceIsNotRequiredIfNoInstallers() {
    AcrossContext context = new AcrossContext();
    context.setInstallerAction( InstallerAction.EXECUTE );
    context.addModule( new TestModule1() );

    context.bootstrap();
  }
View Full Code Here

  @Test
  public void sameModuleIsNotAllowed() {
    AcrossContext context = new AcrossContext();

    TestModule1 duplicate = new TestModule1();

    context.addModule( duplicate );
    context.addModule( new TestModule2() );

    boolean failed = false;
View Full Code Here

    assertTrue( "Adding same module instance should not be allowed", failed );
  }

  @Test
  public void sameModuleCanOnlyBeInOneAcrossContext() {
    TestModule1 module = new TestModule1();

    AcrossContext contextOne = new AcrossContext();
    contextOne.addModule( module );

    AcrossContext contextTwo = new AcrossContext();
View Full Code Here

TOP

Related Classes of com.foreach.across.test.modules.module1.TestModule1

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.