Package net.geco.control

Examples of net.geco.control.StageBuilder


    }
  }
 
  public void importStages(Collection<String> poolDirs) {
    poolStages = new Vector<Stage>(poolDirs.size());
    StageBuilder stageBuilder = new StageBuilder(gecoControl.factory());
    for (String dir : poolDirs) {
      poolStages.add( stageBuilder.loadStage(dir, new PenaltyChecker(gecoControl.factory())) );
    }
  }
View Full Code Here


    return new PenaltyChecker(gecoControl);
  }

  @Override
  public StageBuilder createStageBuilder() {
    return new StageBuilder(getFactory());
  }
View Full Code Here

    return new PenaltyChecker(gecoControl);
  }

  @Override
  public StageBuilder createStageBuilder() {
    return new StageBuilder(getFactory());
  }
View Full Code Here

    verify(mockBuilder, times(1)).createChecker(geco);
  }

  @Test
  public void gecoInitialization(){
    StageBuilder mockStageBuilder = mock(StageBuilder.class);
    when(mockBuilder.createStageBuilder()).thenReturn(mockStageBuilder);
    Geco geco = new Geco();
    geco.initControls(mockBuilder, mock(GecoControl.class));
    verify(mockBuilder, times(1)).buildControls(any(GecoControl.class));
  }
View Full Code Here

   * Alors je dois voir le nom "Valid Stage"
   * Et je dois voir l'horaire zéro 10:00
   */
  @Test
  public void testLoadStageProperties() {
    StageBuilder stageBuilder = new StageBuilder(factory);
    stageBuilder.loadStageProperties(stage, "testData/valid/");
    assertStageData(stage, "Valid Stage", "testData/valid/", "10:00:00", 10, 1);
  }
View Full Code Here

    assertStageData(stage, "Valid Stage", "testData/valid/", "10:00:00", 10, 1);
  }
 
  @Test
  public void testMigration12() {
    StageBuilder stageBuilder = new StageBuilder(factory);
    stageBuilder.loadStageProperties(stage, "testData/valid/");
    assertTrue(stage.version12());
   
    stageBuilder = new StageBuilder(factory);
    stageBuilder.loadStageProperties(stage, "testData/belfield/");
    assertFalse(stage.version12());
  }
View Full Code Here

    assertFalse(stage.version12());
  }
 
  @Test
  public void testLoadStage() {
    StageBuilder stageBuilder = new StageBuilder(factory);
    stage = stageBuilder.loadStage("testData/belfield", new PenaltyChecker(factory));
    assertStageData(stage, "Belfield", "testData/belfield", "9:00:00", 9, 2);
    Registry registry = stage.registry();
    assertEquals(32, registry.getCategories().size());
    assertEquals(13, registry.getClubs().size());
    assertEquals(2, registry.getCourses().size());
View Full Code Here

    assertEquals(60, registry.getRunners().size());
  }

  @Test
  public void testLoadStageWithMissingData() {
    StageBuilder stageBuilder = new StageBuilder(factory);
    stage = stageBuilder.loadStage("testData/damaged", new PenaltyChecker(factory));
    Registry registry = stage.registry();
    assertEquals(3, registry.getCategories().size());
    assertEquals(4, registry.getClubs().size());
    assertEquals(2, registry.getCourses().size());
    assertEquals(9, registry.getRunners().size());   
View Full Code Here

TOP

Related Classes of net.geco.control.StageBuilder

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.