public void Should_Return_Empty_Collection_If_No_Changes_Found() { // Given var fixture = new PullRequestFixture(BasePullRequestFixture.ValidAzureDevOpsServerUrl, 42) { GitClientFactory = new FakeNullForMethodsGitClientFactory() }; var pullRequest = new AzureDevOpsPullRequest(fixture.Log, fixture.Settings, fixture.GitClientFactory); // When var files = pullRequest.GetModifiedFiles(); // Then files.ShouldBeOfType <List <FilePath> >(); files.ShouldNotBeNull(); files.ShouldBeEmpty(); }
public void Should_Return_Valid_Collection_Of_Modified_Files() { // Given var fixture = new PullRequestFixture(BasePullRequestFixture.ValidAzureDevOpsServerUrl, 42); var pullRequest = new AzureDevOpsPullRequest(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"); }