public void makeLevelHandler() { ISectionBuilderConfiguration testSectionBuilderConfigurator = new SectionBuilderConfigurator(testLevelData) as ISectionBuilderConfiguration; ISectionBuilderSelection testSectionBuilderSeclector = new SectionBuilderSelector(testSectionBuilderConfigurator, testLevelData) as ISectionBuilderSelection; testSectionBuilderSeclector.addSectionBuilder(clearBuilder); testSectionBuilderSeclector.addSectionBuilder(new mockSectionBuilderBlades(poolManager)); testSectionBuilderSeclector.addSectionBuilder(new mockSectionBuilderProcessors(poolManager)); ISectionDesigning testSectionDesigner = new SectionDesigner(testSectionBuilderSeclector, testLevelData) as ISectionDesigning; IRowCleanup rowCleaner = new RowCleaner(poolManager); LevelHandler testLevelHandler = new LevelHandler(testLevelData, testSectionDesigner, rowCleaner); Assert.IsNotNull(testLevelHandler); //Assert.IsNotNull(testLevelData.activeSectionBuilder); //Assert.False(testLevelData.newSectionEnd == 0 && testLevelData.newSectionStart == 0); // Assert.True (testLevelData.levelTop == 1); // string levelObjectName = testLevelHandler.level.ToArray()[testLevelHandler.level.Count - 1][0].name; // Assert.True (levelObjectName == "Blade" || levelObjectName == "Processor"); }
public void SectionBuilderConfiguratorTest() { testLevelData.activeSectionBuilder = new mockSectionBuilder(); SectionBuilderConfigurator testSBConfigurator = new SectionBuilderConfigurator(testLevelData); Assert.True(testLevelData.newSectionEnd == 0 && testLevelData.newSectionStart == 0); testSBConfigurator.configureSectionBuilder(); Assert.False(testLevelData.newSectionEnd == 0 && testLevelData.newSectionStart == 0); }
public void makeSectionDesigner() { ISectionBuilderConfiguration testSectionBuilderConfigurator = new SectionBuilderConfigurator(testLevelData) as ISectionBuilderConfiguration; ISectionBuilderSelection testSectionBuilderSeclector = new SectionBuilderSelector(testSectionBuilderConfigurator, testLevelData) as ISectionBuilderSelection; testSectionBuilderSeclector.addSectionBuilder(clearBuilder); testSectionBuilderSeclector.addSectionBuilder(new mockSectionBuilderBlades(poolManager)); testSectionBuilderSeclector.addSectionBuilder(new mockSectionBuilderProcessors(poolManager)); ISectionDesigning testSectionDesigner = new SectionDesigner(testSectionBuilderSeclector, testLevelData) as ISectionDesigning; Assert.IsNotNull(testSectionDesigner); }
public void makeSBSelector() { ISectionBuilderConfiguration testSectionBuilderConfigurator = new SectionBuilderConfigurator(testLevelData) as ISectionBuilderConfiguration; ISectionBuilderSelection testSectionBuilderSeclector = new SectionBuilderSelector(testSectionBuilderConfigurator, testLevelData) as ISectionBuilderSelection; Assert.IsNotNull(testSectionBuilderSeclector); }