Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update dependency xunit to version 2.6.2 #507

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void CommandLineParameters_returns_a_rooted_output_path()
[Theory]
[InlineData(null)]
[InlineData("")]
public void CommandLineParameters_returns_null_if_output_path_is_null_or_empty(string outputPath)
public void CommandLineParameters_returns_null_if_output_path_is_null_or_empty(string? outputPath)
{
// ARRANGE
var sut = new GenerateCommandLineParameters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public class GenerateCommandLineParametersValidatorTest
[Theory]
[InlineData("")]
[InlineData(null)]
public void RepositoryPath_may_be_empty(string repositoryPath)
public void RepositoryPath_may_be_empty(string? repositoryPath)
{
// ARRANGE
var parameters = new GenerateCommandLineParameters()
{
RepositoryPath = repositoryPath
RepositoryPath = repositoryPath!
};

var validator = new GenerateCommandLineParametersValidator();
Expand Down Expand Up @@ -86,7 +86,7 @@ public void RepositoryPath_must_exists()
[Theory]
[InlineData("")]
[InlineData(null)]
public void CurrentVersion_may_be_empty(string value)
public void CurrentVersion_may_be_empty(string? value)
{
// ARRANGE
using var repositoryDirectory = new TemporaryDirectory();
Expand Down Expand Up @@ -136,7 +136,7 @@ public void CurrentVersion_must_be_a_valid_version_if_parameter_is_set(string ve
[Theory]
[InlineData("")]
[InlineData(null)]
public void VersionRange_may_be_empty(string value)
public void VersionRange_may_be_empty(string? value)
{
// ARRANGE
using var repositoryDirectory = new TemporaryDirectory();
Expand Down Expand Up @@ -186,7 +186,7 @@ public void VersionRange_must_be_a_valid_version_range_if_parameter_is_set(strin
[Theory]
[InlineData("")]
[InlineData(null)]
public void GitHubAccessToken_may_be_empty(string value)
public void GitHubAccessToken_may_be_empty(string? value)
{
// ARRANGE
using var repositoryDirectory = new TemporaryDirectory();
Expand All @@ -209,7 +209,7 @@ public void GitHubAccessToken_may_be_empty(string value)
[Theory]
[InlineData("")]
[InlineData(null)]
public void GitLabAccessToken_may_be_empty(string value)
public void GitLabAccessToken_may_be_empty(string? value)
{
// ARRANGE
using var repositoryDirectory = new TemporaryDirectory();
Expand All @@ -232,7 +232,7 @@ public void GitLabAccessToken_may_be_empty(string value)
[Theory]
[InlineData("")]
[InlineData(null)]
public void ConfigurationFilePath_may_be_empty(string path)
public void ConfigurationFilePath_may_be_empty(string? path)
{
// ARRANGE
using var repositoryDirectory = new TemporaryDirectory();
Expand Down
52 changes: 26 additions & 26 deletions src/ChangeLog.Test/Configuration/ConfigurationValidatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class VersionRange
[Theory]
[InlineData("")]
[InlineData(null)]
public void Can_be_null_or_empty(string versionRange)
public void Can_be_null_or_empty(string? versionRange)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -179,7 +179,7 @@ public class CurrentVersion
[Theory]
[InlineData("")]
[InlineData(null)]
public void Can_be_null_or_empty(string currentVersion)
public void Can_be_null_or_empty(string? currentVersion)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -292,7 +292,7 @@ public class GitHub
[Theory]
[InlineData("")]
[InlineData(null)]
public void AccessToken_can_be_null_or_empty(string accessToken)
public void AccessToken_can_be_null_or_empty(string? accessToken)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -333,7 +333,7 @@ public void AccessToken_must_not_be_whitespace(string accessToken)
[InlineData(null)]
[InlineData("\t")]
[InlineData(" ")]
public void RemoteName_must_not_be_null_or_whitespace(string remoteName)
public void RemoteName_must_not_be_null_or_whitespace(string? remoteName)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand All @@ -353,7 +353,7 @@ public void RemoteName_must_not_be_null_or_whitespace(string remoteName)
[Theory]
[InlineData("")]
[InlineData(null)]
public void Host_can_be_null_or_empty(string host)
public void Host_can_be_null_or_empty(string? host)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -392,7 +392,7 @@ public void Host_must_not_be_whitespace(string host)
[Theory]
[InlineData("")]
[InlineData(null)]
public void Owner_can_be_null_or_empty(string owner)
public void Owner_can_be_null_or_empty(string? owner)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -431,7 +431,7 @@ public void Owner_must_not_be_whitespace(string owner)
[Theory]
[InlineData("")]
[InlineData(null)]
public void Repository_can_be_null_or_empty(string repository)
public void Repository_can_be_null_or_empty(string? repository)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -473,7 +473,7 @@ public class GitLab
[Theory]
[InlineData("")]
[InlineData(null)]
public void AccessToken_can_be_null_or_empty(string accessToken)
public void AccessToken_can_be_null_or_empty(string? accessToken)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -514,7 +514,7 @@ public void AccessToken_must_not_be_whitespace(string accessToken)
[InlineData(null)]
[InlineData("\t")]
[InlineData(" ")]
public void RemoteName_must_not_be_null_or_whitespace(string remoteName)
public void RemoteName_must_not_be_null_or_whitespace(string? remoteName)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand All @@ -534,7 +534,7 @@ public void RemoteName_must_not_be_null_or_whitespace(string remoteName)
[Theory]
[InlineData("")]
[InlineData(null)]
public void Host_can_be_null_or_empty(string host)
public void Host_can_be_null_or_empty(string? host)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -573,7 +573,7 @@ public void Host_must_not_be_whitespace(string host)
[Theory]
[InlineData("")]
[InlineData(null)]
public void Namespace_can_be_null_or_empty(string @namespace)
public void Namespace_can_be_null_or_empty(string? @namespace)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -612,7 +612,7 @@ public void Namespace_must_not_be_whitespace(string @namespace)
[Theory]
[InlineData("")]
[InlineData(null)]
public void Project_can_be_null_or_empty(string project)
public void Project_can_be_null_or_empty(string? project)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
Expand Down Expand Up @@ -655,22 +655,22 @@ public class Filter
[Theory]
[InlineData(null)]
[InlineData("")]
public void Type_expression_can_be_null_or_empty(string filterType)
public void Type_expression_can_be_null_or_empty(string? filterType)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
config.Filter.Include = new[]
{
new ChangeLogConfiguration.FilterExpressionConfiguration()
{
Type = filterType
Type = filterType!
}
};
config.Filter.Exclude = new[]
{
new ChangeLogConfiguration.FilterExpressionConfiguration()
{
Type = filterType
Type = filterType!
}
};

Expand Down Expand Up @@ -721,22 +721,22 @@ public void Type_expression_must_not_be_whitespace(string filterType)
[Theory]
[InlineData(null)]
[InlineData("")]
public void Scope_expression_can_be_null_or_empty(string filterType)
public void Scope_expression_can_be_null_or_empty(string? filterType)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
config.Filter.Include = new[]
{
new ChangeLogConfiguration.FilterExpressionConfiguration()
{
Scope = filterType
Scope = filterType!
}
};
config.Filter.Exclude = new[]
{
new ChangeLogConfiguration.FilterExpressionConfiguration()
{
Scope = filterType
Scope = filterType!
}
};

Expand Down Expand Up @@ -954,12 +954,12 @@ public void Provider_must_be_defined_value()
[InlineData("")]
[InlineData("\t")]
[InlineData(" ")]
public void GitNotesNamespace_must_not_be_null_or_whitespace_when_message_overrides_are_enabled(string gitNotesNamespace)
public void GitNotesNamespace_must_not_be_null_or_whitespace_when_message_overrides_are_enabled(string? gitNotesNamespace)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
config.MessageOverrides.Enabled = true;
config.MessageOverrides.GitNotesNamespace = gitNotesNamespace;
config.MessageOverrides.GitNotesNamespace = gitNotesNamespace!;

var sut = new ConfigurationValidator();

Expand All @@ -986,13 +986,13 @@ public void GitNotesNamespace_must_not_be_null_or_whitespace_when_message_overri
[InlineData(true, ChangeLogConfiguration.MessageOverrideProvider.FileSystem, "")]
[InlineData(true, ChangeLogConfiguration.MessageOverrideProvider.FileSystem, "\t")]
[InlineData(true, ChangeLogConfiguration.MessageOverrideProvider.FileSystem, " ")]
public void GitNotesNamespace_may_be_null_or_whitespace_when_message_overrides_are_disabled_or_another_provider_is_used(bool enabled, ChangeLogConfiguration.MessageOverrideProvider provider, string gitNotesNamespace)
public void GitNotesNamespace_may_be_null_or_whitespace_when_message_overrides_are_disabled_or_another_provider_is_used(bool enabled, ChangeLogConfiguration.MessageOverrideProvider provider, string? gitNotesNamespace)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
config.MessageOverrides.Enabled = enabled;
config.MessageOverrides.Provider = provider;
config.MessageOverrides.GitNotesNamespace = gitNotesNamespace;
config.MessageOverrides.GitNotesNamespace = gitNotesNamespace!;

var sut = new ConfigurationValidator();

Expand All @@ -1009,13 +1009,13 @@ public void GitNotesNamespace_may_be_null_or_whitespace_when_message_overrides_a
[InlineData("")]
[InlineData("\t")]
[InlineData(" ")]
public void SourceDirectoryPath_must_not_be_null_or_whitespace_when_message_overrides_are_enabled(string sourceDirectoryPath)
public void SourceDirectoryPath_must_not_be_null_or_whitespace_when_message_overrides_are_enabled(string? sourceDirectoryPath)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
config.MessageOverrides.Enabled = true;
config.MessageOverrides.Provider = ChangeLogConfiguration.MessageOverrideProvider.FileSystem;
config.MessageOverrides.SourceDirectoryPath = sourceDirectoryPath;
config.MessageOverrides.SourceDirectoryPath = sourceDirectoryPath!;

var sut = new ConfigurationValidator();

Expand All @@ -1042,13 +1042,13 @@ public void SourceDirectoryPath_must_not_be_null_or_whitespace_when_message_over
[InlineData(false, ChangeLogConfiguration.MessageOverrideProvider.FileSystem, "")]
[InlineData(false, ChangeLogConfiguration.MessageOverrideProvider.FileSystem, "\t")]
[InlineData(false, ChangeLogConfiguration.MessageOverrideProvider.FileSystem, " ")]
public void SourceDirectoryPath_may_be_null_or_whitespace_when_message_overrides_are_disabled_or_another_provider_is_used(bool enabled, ChangeLogConfiguration.MessageOverrideProvider provider, string sourceDirectoryPath)
public void SourceDirectoryPath_may_be_null_or_whitespace_when_message_overrides_are_disabled_or_another_provider_is_used(bool enabled, ChangeLogConfiguration.MessageOverrideProvider provider, string? sourceDirectoryPath)
{
// ARRANGE
var config = ChangeLogConfigurationLoader.GetDefaultConfiguration();
config.MessageOverrides.Enabled = enabled;
config.MessageOverrides.Provider = provider;
config.MessageOverrides.SourceDirectoryPath = sourceDirectoryPath;
config.MessageOverrides.SourceDirectoryPath = sourceDirectoryPath!;

var sut = new ConfigurationValidator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public class CommitMessageFooterNameTest : EqualityTest<CommitMessageFooterName,
[InlineData("")]
[InlineData(" ")]
[InlineData("\t")]
public void Key_must_not_be_null_or_whitespace(string key)
public void Key_must_not_be_null_or_whitespace(string? key)
{
Assert.Throws<ArgumentException>(() => new CommitMessageFooterName(key));
Assert.Throws<ArgumentException>(() => new CommitMessageFooterName(key!));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public class CommitMessageFooterTest : EqualityTest<CommitMessageFooter, CommitM
[InlineData("")]
[InlineData(" ")]
[InlineData("\t")]
public void Value_must_not_be_null_or_whitespace(string value)
public void Value_must_not_be_null_or_whitespace(string? value)
{
Assert.Throws<ArgumentException>(() => new CommitMessageFooter(new CommitMessageFooterName("name"), value));
Assert.Throws<ArgumentException>(() => new CommitMessageFooter(new CommitMessageFooterName("name"), value!));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public class CommitMessageHeaderTest : EqualityTest<CommitMessageHeader, CommitM
[InlineData("")]
[InlineData(" ")]
[InlineData("\t")]
public void Description_must_not_be_null_or_whitespace(string description)
public void Description_must_not_be_null_or_whitespace(string? description)
{
Assert.Throws<ArgumentException>(() => new CommitMessageHeader(CommitType.Feature, description));
Assert.Throws<ArgumentException>(() => new CommitMessageHeader(CommitType.Feature, description, "someScope"));
Assert.Throws<ArgumentException>(() => new CommitMessageHeader(CommitType.Feature, description!));
Assert.Throws<ArgumentException>(() => new CommitMessageHeader(CommitType.Feature, description!, "someScope"));
}
}
}
4 changes: 2 additions & 2 deletions src/ChangeLog.Test/ConventionalCommits/CommitTypeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public class CommitTypeTest : EqualityTest<CommitType, CommitTypeTest>, IEqualit
[InlineData("")]
[InlineData(" ")]
[InlineData("\t")]
public void Type_must_not_be_null_or_whitespace(string type)
public void Type_must_not_be_null_or_whitespace(string? type)
{
Assert.Throws<ArgumentException>(() => new CommitType(type));
Assert.Throws<ArgumentException>(() => new CommitType(type!));
}

[Theory]
Expand Down
2 changes: 1 addition & 1 deletion src/ChangeLog.Test/E2E/E2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public async Task When_started_outside_of_a_git_repository_and_no_repository_pat
[InlineData(new string[] { "changelog.settings.json", "custom.settings.json" }, "custom.settings.json", "custom.settings.json")]
[InlineData(new string[] { ".config/changelog/settings.json", "custom.settings.json" }, "custom.settings.json", "custom.settings.json")]
[InlineData(new string[] { "changelog.settings.json", ".config/changelog/settings.json", "custom.settings.json" }, "custom.settings.json", "custom.settings.json")]
public async Task The_expected_configuration_file_is_used(string[] configurationFilesOnDisk, string? configurationFileParameter, string expectedConfigurationFile)
public async Task The_expected_configuration_file_is_used(string[] configurationFilesOnDisk, string? configurationFileParameter, string? expectedConfigurationFile)
{
// ARRANGE
using var temporaryDirectory = new TemporaryDirectory();
Expand Down
4 changes: 2 additions & 2 deletions src/ChangeLog.Test/Filtering/FilterExpressionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void Type_must_not_be_whitespace(string type)
[Theory]
[InlineData(null)]
[InlineData("")]
public void Type_may_be_null_or_empty(string type)
public void Type_may_be_null_or_empty(string? type)
{
_ = new FilterExpression(type, "*");
}
Expand All @@ -120,7 +120,7 @@ public void Scope_must_not_be_whitespace(string scope)
[Theory]
[InlineData(null)]
[InlineData("")]
public void Scope_may_be_null_or_empty(string scope)
public void Scope_may_be_null_or_empty(string? scope)
{
_ = new FilterExpression("*", scope);
}
Expand Down
8 changes: 4 additions & 4 deletions src/ChangeLog.Test/Git/GitAuthorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ public class GitAuthorTest : EqualityTest<GitAuthor, GitAuthorTest>, IEqualityTe
[InlineData("")]
[InlineData(" ")]
[InlineData("\t")]
public void Name_must_not_be_null_or_whitespace(string name)
public void Name_must_not_be_null_or_whitespace(string? name)
{
Assert.Throws<ArgumentException>(() => new GitAuthor(name, "[email protected]"));
Assert.Throws<ArgumentException>(() => new GitAuthor(name!, "[email protected]"));
}

[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
[InlineData("\t")]
public void Email_must_not_be_null_or_whitespace(string email)
public void Email_must_not_be_null_or_whitespace(string? email)
{
Assert.Throws<ArgumentException>(() => new GitAuthor("user", email));
Assert.Throws<ArgumentException>(() => new GitAuthor("user", email!));
}

}
Expand Down
Loading