Exemplo n.º 1
0
        public void UnSupportedProjects()
        {
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = @"SDKs\Batch\DataPlane";

            if (cproj.Execute())
            {
                Assert.Equal(3, cproj.unSupportedProjectsToBuild.Count <ITaskItem>());
            }
        }
Exemplo n.º 2
0
        public void ScopedProject()
        {
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = @"SDKs\Compute";
            cproj.IgnoreDirNameForSearchingProjects = Path.Combine(ignoreDir);

            if (cproj.Execute())
            {
                Assert.Equal(cproj.net452SdkProjectsToBuild.Count <ITaskItem>(), 1);
                Assert.Equal(cproj.netCore11TestProjectsToBuild.Count <ITaskItem>(), 1);
            }
        }
Exemplo n.º 3
0
        public void TestIgnoredTokesn()
        {
            //Gallery projects are being ignored
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = @"SDKs\Gallery";
            cproj.IgnoreDirNameForSearchingProjects = @"Gallery";

            if (cproj.Execute())
            {
                Assert.Equal(0, cproj.net452SdkProjectsToBuild.Count());
                Assert.Equal(0, cproj.netCore11TestProjectsToBuild.Count());
            }
        }
Exemplo n.º 4
0
        public void FindTestProject()
        {
            //Operational Insights have named their projects as test.csproj rather than tests.csproj
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = @"SDKs\OperationalInsights";
            cproj.IgnoreDirNameForSearchingProjects = Path.Combine(ignoreDir);

            if (cproj.Execute())
            {
                Assert.Equal(1, cproj.netStd14SdkProjectsToBuild.Count <ITaskItem>());
                Assert.Equal(1, cproj.netCore11TestProjectsToBuild.Count <ITaskItem>());
            }
        }
Exemplo n.º 5
0
        public void CategorizeProjects()
        {
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = "All";
            cproj.IgnoreDirNameForSearchingProjects = Path.Combine(ignoreDir);

            if (cproj.Execute())
            {
                int totalSdkProjectCount = cproj.net452SdkProjectsToBuild.Count() + cproj.netStd14SdkProjectsToBuild.Count <ITaskItem>();
                Assert.Equal(112, totalSdkProjectCount);
                Assert.Equal(54, cproj.netCore11TestProjectsToBuild.Count <ITaskItem>());
                Assert.Equal(7, cproj.net452TestProjectsToBuild.Count <ITaskItem>());
            }
        }
Exemplo n.º 6
0
        public void IgnoredProjects()
        {
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = @"SDKs\KeyVault\dataPlane";
            cproj.IgnoreDirNameForSearchingProjects = Path.Combine(ignoreDir);

            if (cproj.Execute())
            {
                Assert.True(cproj.net452SdkProjectsToBuild.Count <ITaskItem>() > 0);
                Assert.True(cproj.netCore11TestProjectsToBuild.Count <ITaskItem>() > 0);
            }
            else
            {
                Assert.True(false);
            }
        }
Exemplo n.º 7
0
        public void TestFrameworkDir()
        {
            SDKCategorizeProjects cproj = new SDKCategorizeProjects();

            cproj.SourceRootDirPath = sourceRootDir;
            cproj.BuildScope        = @"SDKCommon\TestFramework";
            cproj.IgnoreDirNameForSearchingProjects = Path.Combine(ignoreDir);

            if (cproj.Execute())
            {
                //Since HttpRecorder and TestFramework are multi-targeting, they are no
                //longer treated as regular nuget packages (targeting net452 and netStd1.4)
                //but rather projects that are build without any targetFx
                Assert.Equal(0, cproj.netStd14SdkProjectsToBuild.Count());
                Assert.Equal(2, cproj.net452SdkProjectsToBuild.Count());
                Assert.Equal(2, cproj.netCore11TestProjectsToBuild.Count <ITaskItem>());
            }
        }