Beispiel #1
0
            public void Should_Parse_Framework_Version()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(result.TargetFrameworkVersion, "v4.5");
            }
Beispiel #2
0
            public void Should_Parse_Framework_Profile()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal("Profile111", result.TargetFrameworkProfile);
            }
Beispiel #3
0
            public void Should_Parse_OutputAssembly()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(@"bin/Debug", result.OutputPath.FullPath);
            }
Beispiel #4
0
            public void Should_Return_Parser_Result()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.NotNull(result);
            }
Beispiel #5
0
            public void Should_Return_Correct_File_Count()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(2, result.Files.Count);
            }
Beispiel #6
0
            public void Should_Parse_Platform()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(result.Platform, "AnyCPU");
            }
Beispiel #7
0
            public void Should_Parse_Configuration()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(result.Configuration, "Debug");
            }
Beispiel #8
0
            public void Should_Parse_Output_Type()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(result.OutputType, "Library");
            }
Beispiel #9
0
            public void Should_Parse_Namespace()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(result.RootNameSpace, "Cake.Common");
            }
Beispiel #10
0
            public void Should_Parse_Assembly_Name()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(result.AssemblyName, "Cake.Common");
            }
Beispiel #11
0
            public void Should_Return_Valid_Guid()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Guid projectGuid;
                var  parseResult = Guid.TryParseExact(result.ProjectGuid, "B", out projectGuid);

                Assert.True(parseResult);
            }
Beispiel #12
0
            public void Should_Return_Project_References()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(1, result.ProjectReferences.Count);
                Assert.Equal("/Working/../Cake.Common/Cake.Common.csproj", result.ProjectReferences.First().FilePath.FullPath);
                Assert.Equal("..\\Cake.Common\\Cake.Common.csproj", result.ProjectReferences.First().RelativePath);
                Assert.Equal("{ABC3F1CB-F84E-43ED-A120-0CCFE344D250}", result.ProjectReferences.First().Project);
                Assert.Equal("Cake.Common", result.ProjectReferences.First().Name);
            }
Beispiel #13
0
            public void Should_Return_References()
            {
                // Given
                var fixture = new ProjectParserFixture();

                // When
                var result = fixture.Parse();

                // Then
                Assert.Equal(1, result.References.Count);
                Assert.Equal("System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL",
                             result.References.First().Include);
                Assert.Equal("/Working/../packages/System.Collections.Immutable.1.1.37/lib/dotnet/System.Collections.Immutable.dll",
                             result.References.First().HintPath.FullPath);
                Assert.Equal(true, result.References.First().Private);
            }