Пример #1
0
            public void Should_Return_Correct_Value(string value, int?expected)
            {
                // Given
                var fixture = new TeamCityInfoFixture();

                fixture.Environment.GetEnvironmentVariable("Git_Branch").Returns(value);
                var info = fixture.CreatePullRequestInfo();

                // When
                var result = info.Number;

                // Then
                Assert.Equal(expected, result);
            }
            public void Should_Return_Correct_Value(string value, int?expected)
            {
                // Given
                var fixture = new TeamCityInfoFixture();

                fixture.SetGitBranch(value);
                var info = fixture.CreatePullRequestInfo();

                // When
                var result = info.Number;

                // Then
                Assert.Equal(expected, result);
            }
            public void Should_Return_Correct_Value(string value, int?expected)
            {
                // Given
                var fixture = new TeamCityInfoFixture();

                fixture.SetGitBranch(value);
                fixture.SetBuildPropertiesContent(Properties.Resources.TeamCity_Build_Properties_Xml);
                fixture.SetConfigPropertiesContent(Properties.Resources.TeamCity_Config_Properties_Xml);
                var info = fixture.CreatePullRequestInfo();

                // When
                var result = info.Number;

                // Then
                Assert.Equal(expected, result);
            }