public void Should_succeed_in_parsing_valid_url(string url) { var azureDevOpsRemoteParser = new AzureDevOpsRemoteParser(); azureDevOpsRemoteParser.TryExtractAzureDevopsDataFromRemoteUrl(url, out var owner, out var project, out var repository).Should().BeTrue(); owner.Should().Be("owner"); project.Should().Be("project"); repository.Should().Be("repo"); azureDevOpsRemoteParser.IsValidRemoteUrl(url).Should().BeTrue(); }
public void Should_fail_in_parsing_invalid_url() { var azureDevOpsRemoteParser = new AzureDevOpsRemoteParser(); var url = "https://[email protected]/owner/project/_git/repo"; azureDevOpsRemoteParser.TryExtractAzureDevopsDataFromRemoteUrl(url, out var owner, out var project, out var repository).Should().BeFalse(); owner.Should().BeNull(); project.Should().BeNull(); repository.Should().BeNull(); azureDevOpsRemoteParser.IsValidRemoteUrl(url).Should().BeFalse(); }