diff --git a/src/SharedBuild.Test/Grynwald.SharedBuild.Test.csproj b/src/SharedBuild.Test/Grynwald.SharedBuild.Test.csproj index bda545e..44dc811 100644 --- a/src/SharedBuild.Test/Grynwald.SharedBuild.Test.csproj +++ b/src/SharedBuild.Test/Grynwald.SharedBuild.Test.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/SharedBuild.Test/_Context/_Default/DefaultBuildContextTest.GitHub.PullRequest.cs b/src/SharedBuild.Test/_Context/_Default/DefaultBuildContextTest.GitHub.PullRequest.cs index ea3026e..74445b7 100644 --- a/src/SharedBuild.Test/_Context/_Default/DefaultBuildContextTest.GitHub.PullRequest.cs +++ b/src/SharedBuild.Test/_Context/_Default/DefaultBuildContextTest.GitHub.PullRequest.cs @@ -19,7 +19,7 @@ public class PullRequest [InlineData("true", "23", null, false)] [InlineData("true", "23", "TfsGit", false)] [InlineData("true", "23", "GitHub", true)] - public void IsPullRequest_returns_expected_value_when_building_a_GitHub_PR_on_Azure_Pipelines(string tfBuild, string system_PullRequest_PullRequestId, string build_Repository_Provider, bool expected) + public void IsPullRequest_returns_expected_value_when_building_a_GitHub_PR_on_Azure_Pipelines(string? tfBuild, string? system_PullRequest_PullRequestId, string? build_Repository_Provider, bool expected) { // ARRANGE var context = new FakeCakeContext(); @@ -43,7 +43,7 @@ public void IsPullRequest_returns_expected_value_when_building_a_GitHub_PR_on_Az [InlineData("true", "23", null, null, 0)] [InlineData("true", "23", "TfsGit", null, 0)] [InlineData("true", "23", "GitHub", "42", 42)] - public void PullRequestNumber_returns_expected_value(string tfBuild, string system_PullRequest_PullRequestId, string build_Repository_Provider, string system_PullRequest_PullRequestNumber, int expected) + public void PullRequestNumber_returns_expected_value(string? tfBuild, string? system_PullRequest_PullRequestId, string? build_Repository_Provider, string? system_PullRequest_PullRequestNumber, int expected) { // ARRANGE diff --git a/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubProjectInfoTest.cs b/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubProjectInfoTest.cs index 8196218..34302dd 100644 --- a/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubProjectInfoTest.cs +++ b/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubProjectInfoTest.cs @@ -53,9 +53,9 @@ public class GitHubProjectInfoTest : EqualityTest(() => new GitHubProjectInfo(host, "user", "repo")); + Assert.Throws(() => new GitHubProjectInfo(host!, "user", "repo")); } [Theory] @@ -63,9 +63,9 @@ public void Host_must_not_be_null_or_whitespace(string host) [InlineData("")] [InlineData(" ")] [InlineData("\t")] - public void User_must_not_be_null_or_whitespace(string user) + public void User_must_not_be_null_or_whitespace(string? user) { - Assert.Throws(() => new GitHubProjectInfo("example.com", user, "repo")); + Assert.Throws(() => new GitHubProjectInfo("example.com", user!, "repo")); } [Theory] @@ -73,9 +73,9 @@ public void User_must_not_be_null_or_whitespace(string user) [InlineData("")] [InlineData(" ")] [InlineData("\t")] - public void Project_must_not_be_null_or_whitespace(string project) + public void Project_must_not_be_null_or_whitespace(string? project) { - Assert.Throws(() => new GitHubProjectInfo("example.com", "user", project)); + Assert.Throws(() => new GitHubProjectInfo("example.com", "user", project!)); } } } diff --git a/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubUrlParserTest.cs b/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubUrlParserTest.cs index a41488d..cc018da 100644 --- a/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubUrlParserTest.cs +++ b/src/SharedBuild.Test/_Context/_GitHubUrlParser/GitHubUrlParserTest.cs @@ -18,9 +18,9 @@ public class GitHubUrlParserTest [InlineData("not-a-url")] [InlineData("http://github.com/owner/another-name/repo.git")] // to many segments in the path [InlineData("ftp://github.com/owner/repo.git")] // unsupported scheme - public void ParseRemoteUrl_throws_ArgumentException_for_invalid_input(string url) + public void ParseRemoteUrl_throws_ArgumentException_for_invalid_input(string? url) { - Assert.ThrowsAny(() => GitHubUrlParser.ParseRemoteUrl(url)); + Assert.ThrowsAny(() => GitHubUrlParser.ParseRemoteUrl(url!)); } [Theory] @@ -50,9 +50,9 @@ public void ParseRemoteUrl_returns_the_expected_GitHubProjectInfo(string url, st [InlineData("not-a-url")] [InlineData("http://github.com/owner/another-name/repo.git")] // to many segments in the path [InlineData("ftp://github.com/owner/repo.git")] // unsupported scheme - public void TryParseRemoteUrl_returns_false_for_invalid_input(string url) + public void TryParseRemoteUrl_returns_false_for_invalid_input(string? url) { - Assert.False(GitHubUrlParser.TryParseRemoteUrl(url, out var uri)); + Assert.False(GitHubUrlParser.TryParseRemoteUrl(url!, out var uri)); } [Theory] diff --git a/src/SharedBuild.Test/packages.lock.json b/src/SharedBuild.Test/packages.lock.json index 8853c13..bd6aeb9 100644 --- a/src/SharedBuild.Test/packages.lock.json +++ b/src/SharedBuild.Test/packages.lock.json @@ -54,13 +54,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.6.2, )", + "resolved": "2.6.2", + "contentHash": "sErOyzTZBfgeLcdu5y3CkhCirZikCe9GwEv56jbQRjSa4FyI2tIHjfBRvlWqg7M78bfAGajrreH0IHnxrUOpVA==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.6.0", + "xunit.assert": "2.6.2", + "xunit.core": "[2.6.2]" } }, "xunit.runner.visualstudio": { @@ -1241,30 +1241,27 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.6.0", + "contentHash": "b/Wbrqr/bFvcjqAbYdJyCCvjz+PjjKMnoK/K6sbcCBu94pqAkB2vBAHFo87wNq2awsLPAuq5MA7q0XexyQ3mJQ==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } + "resolved": "2.6.2", + "contentHash": "JOj2+zWS08M59bCk3MkZFcKj2Izb2zwkHSPIKJLvnZYLR2Nw6HifjvBCpa8XhMF3mxDuGwZ0+ncmlhE9WoEaZw==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.6.2", + "contentHash": "LxJ06D9uTDyvHY52+Lym2TUlq3ObgAKSTuzM9gniau8qI1fd/CPag4PFaGs0RJfunUJtYHg9+XrS5EcW/5dxGA==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.6.2]", + "xunit.extensibility.execution": "[2.6.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.6.2", + "contentHash": "T8CmshbP1EeaDibLwgU/aEe53zrW0+x+mEz5aKxexS5vVyj1UwgDUjcTK/+prMF/9KgMHkgx1vIe7wv58wO6RQ==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -1272,11 +1269,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.6.2", + "contentHash": "kKo7XqyLF8blXGqQHlqKQ+AzST42kpB7oG81Km/kFEzWVfeDMgaEquOLAr/ZiR4tnkUbbWYrY6CJPTavFqGn6Q==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.6.2]" } }, "grynwald.sharedbuild": { @@ -1343,13 +1340,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.5.1, )", - "resolved": "2.5.1", - "contentHash": "WJJ7Ruxv1INF4ySosVZ0fN1dGhzNBEdLLZoIVn4TPU8CbYgaxUebAL/VPaBneXGT3EDE2llsJ2cKzGkGeZSY4Q==", + "requested": "[2.6.2, )", + "resolved": "2.6.2", + "contentHash": "sErOyzTZBfgeLcdu5y3CkhCirZikCe9GwEv56jbQRjSa4FyI2tIHjfBRvlWqg7M78bfAGajrreH0IHnxrUOpVA==", "dependencies": { - "xunit.analyzers": "1.3.0", - "xunit.assert": "2.5.1", - "xunit.core": "[2.5.1]" + "xunit.analyzers": "1.6.0", + "xunit.assert": "2.6.2", + "xunit.core": "[2.6.2]" } }, "xunit.runner.visualstudio": { @@ -2530,30 +2527,27 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "gSk+8RC6UZ6Fzx1OHoB2bPyENeg3WHIeJhB/hb4oZNN0pW0dwOuplJay6OnqFIvW8T37re/RB4PWpEvayWIO1Q==" + "resolved": "1.6.0", + "contentHash": "b/Wbrqr/bFvcjqAbYdJyCCvjz+PjjKMnoK/K6sbcCBu94pqAkB2vBAHFo87wNq2awsLPAuq5MA7q0XexyQ3mJQ==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "eMvuz6PFdD3DDeaXkFVwMzNZ40zcRoM9Zz3siAyWgfiAucSNOWZnVgqC8hSHbdMd98Gy6o0yIYG6mq4Tg37rrQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } + "resolved": "2.6.2", + "contentHash": "JOj2+zWS08M59bCk3MkZFcKj2Izb2zwkHSPIKJLvnZYLR2Nw6HifjvBCpa8XhMF3mxDuGwZ0+ncmlhE9WoEaZw==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "Tzuz//XwPJYAmC9FBIwgBgo5gb2kSoppDwkisyYhq0wtwxhv+gOJwtqUgkgk8Hr19B616Zol03LkD18r2e4AxA==", + "resolved": "2.6.2", + "contentHash": "LxJ06D9uTDyvHY52+Lym2TUlq3ObgAKSTuzM9gniau8qI1fd/CPag4PFaGs0RJfunUJtYHg9+XrS5EcW/5dxGA==", "dependencies": { - "xunit.extensibility.core": "[2.5.1]", - "xunit.extensibility.execution": "[2.5.1]" + "xunit.extensibility.core": "[2.6.2]", + "xunit.extensibility.execution": "[2.6.2]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "XGPiWP7D/KIY/fzdmU9gx7eDt0QD0IAWOy54LI+ckLZCqFMupIFochC3dHRxykuAz+L0nYvz6PxDdR2UcgNmDw==", + "resolved": "2.6.2", + "contentHash": "T8CmshbP1EeaDibLwgU/aEe53zrW0+x+mEz5aKxexS5vVyj1UwgDUjcTK/+prMF/9KgMHkgx1vIe7wv58wO6RQ==", "dependencies": { "NETStandard.Library": "1.6.1", "xunit.abstractions": "2.0.3" @@ -2561,11 +2555,11 @@ }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.5.1", - "contentHash": "I5IUervdZoKLD66TUcqsJDXcB3ui9RxzKe0MQGzEi4Hsxkaoz0YylmvwqW2nd3nilyqqIAs0OUaZf/faKPxY6w==", + "resolved": "2.6.2", + "contentHash": "kKo7XqyLF8blXGqQHlqKQ+AzST42kpB7oG81Km/kFEzWVfeDMgaEquOLAr/ZiR4tnkUbbWYrY6CJPTavFqGn6Q==", "dependencies": { "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.5.1]" + "xunit.extensibility.core": "[2.6.2]" } }, "grynwald.sharedbuild": {