Use the I_can_try_to... naming pattern in tests

This commit is contained in:
Tyrrrz
2023-11-11 22:35:00 +02:00
parent 8646c9de5e
commit 0fe9c89fa0
5 changed files with 18 additions and 18 deletions

View File

@@ -846,7 +846,7 @@ public class ConversionSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_parameter_or_an_option_to_a_property_and_get_an_error_if_the_user_provides_an_invalid_value()
public async Task I_can_try_to_bind_a_parameter_or_an_option_to_a_property_and_get_an_error_if_the_user_provides_an_invalid_value()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -882,7 +882,7 @@ public class ConversionSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_parameter_or_an_option_to_a_property_and_get_an_error_if_a_custom_validator_fails()
public async Task I_can_try_to_bind_a_parameter_or_an_option_to_a_property_and_get_an_error_if_a_custom_validator_fails()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -928,7 +928,7 @@ public class ConversionSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_parameter_or_an_option_to_a_string_parsable_property_and_get_an_error_if_the_parsing_fails()
public async Task I_can_try_to_bind_a_parameter_or_an_option_to_a_string_parsable_property_and_get_an_error_if_the_parsing_fails()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(

View File

@@ -594,7 +594,7 @@ public class OptionBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_required_option_to_a_property_and_get_an_error_if_the_user_does_not_provide_the_corresponding_argument()
public async Task I_can_try_to_bind_a_required_option_to_a_property_and_get_an_error_if_the_user_does_not_provide_the_corresponding_argument()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -630,7 +630,7 @@ public class OptionBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_required_option_to_a_property_and_get_an_error_if_the_user_provides_an_empty_argument()
public async Task I_can_try_to_bind_a_required_option_to_a_property_and_get_an_error_if_the_user_provides_an_empty_argument()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -666,7 +666,7 @@ public class OptionBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_an_option_to_a_non_scalar_property_and_get_an_error_if_the_user_does_not_provide_at_least_one_corresponding_argument()
public async Task I_can_try_to_bind_an_option_to_a_non_scalar_property_and_get_an_error_if_the_user_does_not_provide_at_least_one_corresponding_argument()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -702,7 +702,7 @@ public class OptionBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_options_and_get_an_error_if_the_user_provides_unrecognized_arguments()
public async Task I_can_try_to_bind_options_and_get_an_error_if_the_user_provides_unrecognized_arguments()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -738,7 +738,7 @@ public class OptionBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_an_option_to_a_scalar_property_and_get_an_error_if_the_user_provides_too_many_arguments()
public async Task I_can_try_to_bind_an_option_to_a_scalar_property_and_get_an_error_if_the_user_provides_too_many_arguments()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(

View File

@@ -115,7 +115,7 @@ public class ParameterBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_parameter_to_a_property_and_get_an_error_if_the_user_does_not_provide_the_corresponding_argument()
public async Task I_can_try_to_bind_a_parameter_to_a_property_and_get_an_error_if_the_user_does_not_provide_the_corresponding_argument()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -154,7 +154,7 @@ public class ParameterBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_a_parameter_to_a_non_scalar_property_and_get_an_error_if_the_user_does_not_provide_at_least_one_corresponding_argument()
public async Task I_can_try_to_bind_a_parameter_to_a_non_scalar_property_and_get_an_error_if_the_user_does_not_provide_at_least_one_corresponding_argument()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -238,7 +238,7 @@ public class ParameterBindingSpecs : SpecsBase
}
[Fact]
public async Task I_can_bind_parameters_and_get_an_error_if_the_user_provides_too_many_arguments()
public async Task I_can_try_to_bind_parameters_and_get_an_error_if_the_user_provides_too_many_arguments()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(

View File

@@ -54,7 +54,7 @@ public class TypeActivationSpecs : SpecsBase
}
[Fact]
public async Task I_can_configure_the_application_to_use_the_default_type_activator_and_get_an_error_if_the_requested_type_does_not_have_a_parameterless_constructor()
public async Task I_can_try_to_configure_the_application_to_use_the_default_type_activator_and_get_an_error_if_the_requested_type_does_not_have_a_parameterless_constructor()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(
@@ -187,7 +187,7 @@ public class TypeActivationSpecs : SpecsBase
}
[Fact]
public async Task I_can_configure_the_application_to_use_a_custom_type_activator_and_get_an_error_if_the_requested_type_cannot_be_initialized()
public async Task I_can_try_to_configure_the_application_to_use_a_custom_type_activator_and_get_an_error_if_the_requested_type_cannot_be_initialized()
{
// Arrange
var commandType = DynamicCommandBuilder.Compile(

View File

@@ -7,13 +7,13 @@ internal static class ConsoleExtensions
{
public static void DumpToTestOutput(
this FakeInMemoryConsole console,
ITestOutputHelper testOutputHelper
ITestOutputHelper testOutput
)
{
testOutputHelper.WriteLine("[*] Captured standard output:");
testOutputHelper.WriteLine(console.ReadOutputString());
testOutput.WriteLine("[*] Captured standard output:");
testOutput.WriteLine(console.ReadOutputString());
testOutputHelper.WriteLine("[*] Captured standard error:");
testOutputHelper.WriteLine(console.ReadErrorString());
testOutput.WriteLine("[*] Captured standard error:");
testOutput.WriteLine(console.ReadErrorString());
}
}