public void ExecuteSdkScope()
        {
            SkipBuildOrTestExecutionTask ste = new SkipBuildOrTestExecutionTask(rootDir);

            ste.BuildScopes           = "sdk;compute";
            ste.SkipFromTestExecution = true;
            ste.ProjectType           = "Test";
            Assert.Throws <NotSupportedException>(() => ste.Execute());
        }
        public void SkipTestExecutionForMultipleProjects()
        {
            SkipBuildOrTestExecutionTask ste = new SkipBuildOrTestExecutionTask(rootDir);

            ste.BuildScopes           = @"Advisor;Cdn";
            ste.SkipFromTestExecution = true;
            ste.ProjectType           = "Test";
            Assert.True(ste.Execute());
        }
        public void SkipPrivateDns()
        {
            SkipBuildOrTestExecutionTask ste = new SkipBuildOrTestExecutionTask(rootDir);

            ste.BuildScope            = @"privatedns";
            ste.SkipFromTestExecution = true;
            ste.SkipFromBuild         = true;
            ste.ProjectType           = "Test";
            Assert.True(ste.Execute());
        }
        public void SkipTestExecutionForOneProjects()
        {
            ProjectSearchUtility psu       = new ProjectSearchUtility(rootDir);
            List <string>        scopeDirs = psu.FindTopLevelScopes(returnPartialScopePaths: true);

            Assert.NotEmpty(scopeDirs);

            SkipBuildOrTestExecutionTask ste = new SkipBuildOrTestExecutionTask(rootDir);

            ste.BuildScope            = @"Advisor";
            ste.SkipFromTestExecution = true;
            ste.ProjectType           = "Test";
            Assert.True(ste.Execute());
        }
        public void SkipTestExecutionForAllProjects()
        {
            SkipBuildOrTestExecutionTask ste = new SkipBuildOrTestExecutionTask(rootDir);

            ste.BuildScope            = "sdk";
            ste.SkipFromTestExecution = true;
            ste.ProjectType           = "Test";
            Assert.Throws <NotSupportedException>(() => ste.Execute());

            //We are executing the positive case under whatIf to avoid file changes
            ste = new SkipBuildOrTestExecutionTask(rootDir);
            string sdkComputeScope = Path.Combine("sdk", "compute");

            ste.BuildScopes           = string.Concat(sdkComputeScope, ";", "storage");
            ste.SkipFromTestExecution = true;
            ste.ProjectType           = "Test";
            ste.WhatIf = true;

            Assert.True(ste.Execute());
        }