Exemple #1
0
 public CustomProjectParserTests()
 {
     fs = new FakeFileSystem(FakeEnvironment.CreateUnixEnvironment());
     validCsProjFile                        = fs.CreateFakeFile("CsProj_ValidFile".SafeLoad());
     valid2017CsProjFile                    = fs.CreateFakeFile("VS2017_CsProj_ValidFile".SafeLoad());
     valid2017CsProjNetcoreFile             = fs.CreateFakeFile("VS2017_CsProj_NetCoreDefault".SafeLoad());
     valid2017CsProjNetstandardFile         = fs.CreateFakeFile("VS2017_CsProj_NetStandard_ValidFile".SafeLoad());
     validCsProjConditionalReferenceFile    = fs.CreateFakeFile("CsProj_ConditionReference_ValidFile".SafeLoad());
     validCsProjWebApplicationFile          = fs.CreateFakeFile("CsProj_ValidWebApplication".SafeLoad());
     validCsProjWithAbsoluteFilePaths       = fs.CreateFakeFile("CsProj_AbsolutePath".SafeLoad());
     validCsProjAppendTargetFrameworkFile   = fs.CreateFakeFile("CsProj_AppendTargetFramework".SafeLoad());
     validCsProjNoAppendTargetFrameworkFile = fs.CreateFakeFile("CsProj_NoAppendTargetFramework".SafeLoad());
 }
        public void CanGetOutputAssemblies_For_CSProjFile()
        {
            var file    = fs.CreateFakeFile("CsProj_ValidFile".SafeLoad());
            var workDir = cakeContext.Environment.WorkingDirectory.FullPath;

            var result = cakeContext.GetOutputAssemblies(file.Path, "Debug", "AnyCPU");

            result.Should().ContainSingle().Which.FullPath.Should().Be($"{workDir}/bin/Debug/Cake.Common.dll");
        }
Exemple #3
0
        public void ForTfm_net451_IsNetFramework_IsSet()
        {
            var projectString = ProjectFileHelpers.GetNetCoreProjectWithString(
                "<PropertyGroup><TargetFramework>net451</TargetFramework></PropertyGroup>");
            var file = fs.CreateFakeFile(projectString);

            var project = file.ParseProjectFile("Release");

            project.IsNetFramework.Should().BeTrue();
            project.IsNetCore.Should().BeFalse();
            project.IsNetStandard.Should().BeFalse();
        }