public void Build_ValidParametersWithSubPath_CorrectParametersTransferedToBuilder() { var builderMockFactory = new Mock <IRunnerConfigBuilder>(); builderMockFactory.Setup(builder => builder.Build( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())); var nunit = builderMockFactory.Object; var gallio = builderMockFactory.Object; var manager = new RunnerConfigManager(nunit, gallio); manager.Build(@"C:\QA\", @"C:\QA\Framework\Version", @"C:\QA\TestSuites\Serie\Alpha\ts.nbits", true, true); builderMockFactory.Verify(builder => builder.Build( @"C:\QA\", @"..\..\..\", @"Framework\Version\", @"TestSuites\Serie\Alpha\", "ts")); }
internal void Create(string frameworkPath, string rootPath, string testSuitePath, bool isNUnit, bool isGallio) { runnerConfigManager.Build( rootPath, frameworkPath, testSuitePath, isNUnit, isGallio ); }
public void Build_NoNUnitYesGallio_OnlyGallioBuilderCalled() { var nunitBuilderMockFactory = new Mock <IRunnerConfigBuilder>(); nunitBuilderMockFactory.Setup(builder => builder.Build( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())); var nunit = nunitBuilderMockFactory.Object; var gallioBuilderMockFactory = new Mock <IRunnerConfigBuilder>(); gallioBuilderMockFactory.Setup(builder => builder.Build( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())); var gallio = gallioBuilderMockFactory.Object; var manager = new RunnerConfigManager(nunit, gallio); manager.Build(@"C:\", @"C:\Framework", @"C:\TestSuite", false, true); nunitBuilderMockFactory.Verify(builder => builder.Build( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>()), Times.Never()); gallioBuilderMockFactory.Verify(builder => builder.Build( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>()), Times.Once()); }
public void Build_NoNUnitYesGallio_OnlyGallioBuilderCalled() { var nunitBuilderMockFactory = new Mock<IRunnerConfigBuilder>(); nunitBuilderMockFactory.Setup(builder => builder.Build( It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())); var nunit = nunitBuilderMockFactory.Object; var gallioBuilderMockFactory = new Mock<IRunnerConfigBuilder>(); gallioBuilderMockFactory.Setup(builder => builder.Build( It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())); var gallio = gallioBuilderMockFactory.Object; var manager = new RunnerConfigManager(nunit, gallio); manager.Build(@"C:\", @"C:\Framework", @"C:\TestSuite", false, true); nunitBuilderMockFactory.Verify(builder => builder.Build( It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>()), Times.Never()); gallioBuilderMockFactory.Verify(builder => builder.Build( It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>()), Times.Once()); }
public void Build_ValidParametersWithSubPath_CorrectParametersTransferedToBuilder() { var builderMockFactory = new Mock<IRunnerConfigBuilder>(); builderMockFactory.Setup(builder => builder.Build( It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())); var nunit = builderMockFactory.Object; var gallio = builderMockFactory.Object; var manager = new RunnerConfigManager(nunit, gallio); manager.Build(@"C:\QA\", @"C:\QA\Framework\Version", @"C:\QA\TestSuites\Serie\Alpha\ts.nbits", true, true); builderMockFactory.Verify(builder => builder.Build( @"C:\QA\", @"..\..\..\", @"Framework\Version\", @"TestSuites\Serie\Alpha\", "ts")); }