コード例 #1
0
            public void Should_Return_Empty_Collection_If_No_Changes_Found()
            {
                // Given
                var fixture = new PullRequestFixture(BasePullRequestFixture.ValidTfsUrl, 42)
                {
                    GitClientFactory = new FakeNullForMethodsGitClientFactory()
                };
                var pullRequest = new TfsPullRequest(fixture.Log, fixture.Settings, fixture.GitClientFactory);

                // When
                var files = pullRequest.GetModifiedFiles();

                // Then
                files.ShouldBeOfType <List <FilePath> >();
                files.ShouldNotBeNull();
                files.ShouldBeEmpty();
            }
コード例 #2
0
            public void Should_Return_Valid_Collection_Of_Modified_Files()
            {
                // Given
                var fixture     = new PullRequestFixture(BasePullRequestFixture.ValidTfsUrl, 42);
                var pullRequest = new TfsPullRequest(fixture.Log, fixture.Settings, fixture.GitClientFactory);

                // When
                var files = pullRequest.GetModifiedFiles();

                // Then
                files.ShouldNotBeNull();
                files.ShouldNotBeEmpty();
                files.ShouldHaveSingleItem();

                var filePath = files.First();

                filePath.ShouldBeOfType <FilePath>();
                filePath.ShouldNotBeNull();
                filePath.FullPath.ShouldNotBeEmpty();
                filePath.FullPath.ShouldBe("src/project/myclass.cs");
            }