コード例 #1
0
        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"));
        }
コード例 #2
0
ファイル: RunnerConfigPresenter.cs プロジェクト: ywscr/NBi
 internal void Create(string frameworkPath, string rootPath, string testSuitePath, bool isNUnit, bool isGallio)
 {
     runnerConfigManager.Build(
         rootPath,
         frameworkPath,
         testSuitePath,
         isNUnit,
         isGallio
         );
 }
コード例 #3
0
        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());
        }
コード例 #4
0
        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());
        }
コード例 #5
0
        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"));
        }