diff --git a/FastEndpoints.TemplatePack.csproj b/FastEndpoints.TemplatePack.csproj index e8d7afb..ef66fa6 100644 --- a/FastEndpoints.TemplatePack.csproj +++ b/FastEndpoints.TemplatePack.csproj @@ -2,7 +2,7 @@ - 1.3.3 + 1.4.0 Template FastEndpoints.TemplatePack diff --git a/changelog.md b/changelog.md index 00ab881..7801f6c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,4 @@ +- upgrade to .net 8 - upgrade dependencies to latest -- minor template refactoring +- refactor to use primary constructors - update `.editorconfig` file \ No newline at end of file diff --git a/templates/project/.editorconfig b/templates/project/.editorconfig index f51bd40..a475471 100644 --- a/templates/project/.editorconfig +++ b/templates/project/.editorconfig @@ -1,179 +1,188 @@ -[*] -charset = utf-8 -end_of_line = crlf -insert_final_newline = false -indent_style = space -indent_size = 4 - -[{*.har,*.json}] -indent_size = 2 - -[*.cs] -csharp_new_line_before_members_in_object_initializers = false -csharp_new_line_between_query_expression_clauses = false -csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion -csharp_style_prefer_utf8_string_literals = true:suggestion -csharp_style_var_elsewhere = true:suggestion -csharp_style_var_for_built_in_types = true:suggestion -csharp_style_var_when_type_is_apparent = true:suggestion -dotnet_naming_rule.parameters_rule.import_to_resharper = as_predefined -dotnet_naming_rule.parameters_rule.resharper_style = aaBb, AaBb -dotnet_naming_rule.parameters_rule.severity = warning -dotnet_naming_rule.parameters_rule.style = lower_camel_case_style_1 -dotnet_naming_rule.parameters_rule.symbols = parameters_symbols -dotnet_naming_rule.private_constants_rule.import_to_resharper = as_predefined -dotnet_naming_rule.private_constants_rule.severity = warning -dotnet_naming_rule.private_constants_rule.style = upper_camel_case_style -dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols -dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = as_predefined -dotnet_naming_rule.private_static_readonly_rule.severity = warning -dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style -dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols -dotnet_naming_style.lower_camel_case_style.capitalization = camel_case -dotnet_naming_style.lower_camel_case_style.required_prefix = _ -dotnet_naming_style.lower_camel_case_style_1.capitalization = camel_case -dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case -dotnet_naming_symbols.parameters_symbols.applicable_accessibilities = * -dotnet_naming_symbols.parameters_symbols.applicable_kinds = parameter -dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private -dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field -dotnet_naming_symbols.private_constants_symbols.required_modifiers = const -dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private -dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field -dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly -dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none -dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion -dotnet_style_predefined_type_for_member_access = true:suggestion -dotnet_style_qualification_for_event = false:suggestion -dotnet_style_qualification_for_field = false:suggestion -dotnet_style_qualification_for_method = false:suggestion -dotnet_style_qualification_for_property = false:suggestion -dotnet_style_require_accessibility_modifiers = never:error - -resharper_align_linq_query = true -resharper_align_multiline_binary_patterns = true -resharper_align_multiline_calls_chain = true -resharper_align_multiline_expression = true -resharper_align_multiline_extends_list = true -resharper_align_multiline_parameter = true -resharper_align_multiple_declaration = true -resharper_align_multline_type_parameter_constrains = true -resharper_align_multline_type_parameter_list = true -resharper_align_tuple_components = true -resharper_apply_auto_detected_rules = false -resharper_autodetect_indent_settings = true -resharper_blank_lines_after_block_statements = 0 -resharper_blank_lines_after_control_transfer_statements = 1 -resharper_blank_lines_before_block_statements = 1 -resharper_blank_lines_before_control_transfer_statements = 1 -resharper_blank_lines_before_single_line_comment = 1 -resharper_braces_for_dowhile = required_for_multiline -resharper_braces_for_fixed = required_for_multiline -resharper_braces_for_for = required_for_multiline -resharper_braces_for_foreach = required_for_multiline -resharper_braces_for_ifelse = required_for_multiline -resharper_braces_for_lock = required_for_multiline -resharper_braces_for_using = required_for_multiline -resharper_braces_for_while = required_for_multiline -resharper_csharp_empty_block_style = together_same_line -resharper_csharp_int_align_comments = true -resharper_csharp_keep_blank_lines_in_code = 1 -resharper_csharp_keep_blank_lines_in_declarations = 1 -resharper_csharp_stick_comment = false -resharper_csharp_wrap_after_invocation_lpar = true -resharper_csharp_wrap_arguments_style = chop_if_long -resharper_csharp_wrap_before_first_type_parameter_constraint = true -resharper_csharp_wrap_multiple_declaration_style = chop_always -resharper_csharp_wrap_parameters_style = chop_if_long -resharper_enforce_line_ending_style = true -resharper_force_attribute_style = join -resharper_formatter_off_tag = @formatter:off -resharper_formatter_on_tag = @formatter:on -resharper_formatter_tags_enabled = true -resharper_indent_nested_fixed_stmt = true -resharper_indent_nested_foreach_stmt = true -resharper_indent_nested_for_stmt = true -resharper_indent_nested_lock_stmt = true -resharper_indent_nested_usings_stmt = true -resharper_indent_nested_while_stmt = true -resharper_indent_preprocessor_if = outdent -resharper_indent_preprocessor_other = outdent -resharper_indent_preprocessor_region = outdent -resharper_keep_existing_declaration_parens_arrangement = false -resharper_keep_existing_embedded_arrangement = false -resharper_keep_existing_embedded_block_arrangement = true -resharper_keep_existing_expr_member_arrangement = false -resharper_keep_existing_invocation_parens_arrangement = false -resharper_keep_existing_property_patterns_arrangement = false -resharper_keep_existing_switch_expression_arrangement = false -resharper_local_function_body = expression_body -resharper_max_array_initializer_elements_on_line = 10 -resharper_max_enum_members_on_line = 1 -resharper_max_formal_parameters_on_line = 10 -resharper_max_invocation_arguments_on_line = 10 -resharper_method_or_operator_body = expression_body -resharper_object_creation_when_type_not_evident = target_typed -resharper_place_accessorholder_attribute_on_same_line = false -resharper_place_accessor_with_attrs_holder_on_single_line = true -resharper_place_expr_method_on_single_line = false -resharper_place_linq_into_on_new_line = false -resharper_place_simple_embedded_statement_on_same_line = false -resharper_place_simple_method_on_single_line = true -resharper_show_autodetect_configure_formatting_tip = false -resharper_space_within_slice_pattern = false -resharper_use_continuous_indent_inside_initializer_braces = false -resharper_use_indent_from_vs = false -resharper_wrap_array_initializer_style = chop_if_long -resharper_wrap_before_arrow_with_expressions = true -resharper_wrap_before_binary_pattern_op = false -resharper_wrap_chained_binary_expressions = chop_if_long -resharper_wrap_chained_binary_patterns = chop_if_long -resharper_xmldoc_blank_line_after_pi = false -resharper_xmldoc_indent_text = ZeroIndent - -resharper_arrange_attributes_highlighting = suggestion -resharper_arrange_constructor_or_destructor_body_highlighting = suggestion -resharper_arrange_default_value_when_type_not_evident_highlighting = suggestion -resharper_arrange_local_function_body_highlighting = suggestion -resharper_arrange_method_or_operator_body_highlighting = hint -resharper_arrange_null_checking_pattern_highlighting = suggestion -resharper_arrange_object_creation_when_type_not_evident_highlighting = suggestion -resharper_arrange_redundant_parentheses_highlighting = hint -resharper_arrange_this_qualifier_highlighting = hint -resharper_auto_property_can_be_made_get_only_global_highlighting = none -resharper_built_in_type_reference_style_for_member_access_highlighting = hint -resharper_built_in_type_reference_style_highlighting = hint -resharper_check_namespace_highlighting = none -resharper_class_never_instantiated_global_highlighting = none -resharper_class_with_virtual_members_never_inherited_global_highlighting = none -resharper_collection_never_updated_global_highlighting = none -resharper_co_variant_array_conversion_highlighting = hint -resharper_empty_for_statement_highlighting = none -resharper_for_can_be_converted_to_foreach_highlighting = none -resharper_loop_can_be_converted_to_query_highlighting = none -resharper_member_can_be_private_global_highlighting = none -resharper_parameter_hides_member_highlighting = none -resharper_possible_multiple_enumeration_highlighting = suggestion -resharper_redundant_base_qualifier_highlighting = warning -resharper_return_value_of_pure_method_is_not_used_highlighting = none -resharper_separate_local_functions_with_jump_statement_highlighting = none -resharper_static_member_in_generic_type_highlighting = none -resharper_suggest_base_type_for_parameter_in_constructor_highlighting = suggestion -resharper_suggest_var_or_type_built_in_types_highlighting = hint -resharper_suggest_var_or_type_elsewhere_highlighting = hint -resharper_suggest_var_or_type_simple_types_highlighting = hint -resharper_switch_expression_handles_some_known_enum_values_with_exception_in_default_highlighting = suggestion -resharper_switch_statement_handles_some_known_enum_values_with_default_highlighting = suggestion -resharper_switch_statement_missing_some_enum_cases_no_default_highlighting = suggestion -resharper_unused_auto_property_accessor_global_highlighting = none -resharper_unused_auto_property_accessor_local_highlighting = none -resharper_unused_member_global_highlighting = none -resharper_unused_method_return_value_global_highlighting = none -resharper_web_config_module_not_resolved_highlighting = warning -resharper_web_config_type_not_resolved_highlighting = warning -resharper_web_config_wrong_module_highlighting = warning - -[{*Request.cs,*Response.cs,*Models.cs,*Endpoint.cs}] +[*] +charset = utf-8 +end_of_line = crlf +insert_final_newline = false +indent_style = space +indent_size = 4 + +[{*.har,*.json}] +indent_size = 2 + +[*.{received,verified}.{txt,xml,json}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false + +[*.cs] +csharp_new_line_before_members_in_object_initializers = false +csharp_new_line_between_query_expression_clauses = false +csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion +csharp_style_var_elsewhere = true:suggestion +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +dotnet_naming_rule.parameters_rule.import_to_resharper = as_predefined +dotnet_naming_rule.parameters_rule.resharper_style = aaBb, AaBb +dotnet_naming_rule.parameters_rule.severity = warning +dotnet_naming_rule.parameters_rule.style = lower_camel_case_style_1 +dotnet_naming_rule.parameters_rule.symbols = parameters_symbols +dotnet_naming_rule.private_constants_rule.import_to_resharper = as_predefined +dotnet_naming_rule.private_constants_rule.severity = warning +dotnet_naming_rule.private_constants_rule.style = upper_camel_case_style +dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols +dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = as_predefined +dotnet_naming_rule.private_static_readonly_rule.severity = warning +dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style +dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols +dotnet_naming_style.lower_camel_case_style.capitalization = camel_case +dotnet_naming_style.lower_camel_case_style.required_prefix = _ +dotnet_naming_style.lower_camel_case_style_1.capitalization = camel_case +dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case +dotnet_naming_symbols.parameters_symbols.applicable_accessibilities = * +dotnet_naming_symbols.parameters_symbols.applicable_kinds = parameter +dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field +dotnet_naming_symbols.private_constants_symbols.required_modifiers = const +dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly +dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none +dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion +dotnet_style_qualification_for_event = false:suggestion +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_require_accessibility_modifiers = never:error + +resharper_align_linq_query = true +resharper_align_multiline_binary_patterns = true +resharper_align_multiline_calls_chain = true +resharper_align_multiline_expression = true +resharper_align_multiline_extends_list = true +resharper_align_multiline_parameter = true +resharper_align_multiple_declaration = true +resharper_align_multline_type_parameter_constrains = true +resharper_align_multline_type_parameter_list = true +resharper_align_tuple_components = true +resharper_apply_auto_detected_rules = false +resharper_autodetect_indent_settings = true +resharper_blank_lines_after_block_statements = 0 +resharper_blank_lines_after_control_transfer_statements = 1 +resharper_blank_lines_before_block_statements = 1 +resharper_blank_lines_before_control_transfer_statements = 1 +resharper_blank_lines_before_single_line_comment = 1 +resharper_braces_for_dowhile = required_for_multiline +resharper_braces_for_fixed = required_for_multiline +resharper_braces_for_for = required_for_multiline +resharper_braces_for_foreach = required_for_multiline +resharper_braces_for_ifelse = required_for_multiline +resharper_braces_for_lock = required_for_multiline +resharper_braces_for_using = required_for_multiline +resharper_braces_for_while = required_for_multiline +resharper_csharp_empty_block_style = together_same_line +resharper_csharp_int_align_comments = true +resharper_csharp_keep_blank_lines_in_code = 1 +resharper_csharp_keep_blank_lines_in_declarations = 1 +resharper_csharp_stick_comment = false +resharper_csharp_wrap_after_invocation_lpar = true +resharper_csharp_wrap_arguments_style = chop_if_long +resharper_csharp_wrap_before_first_type_parameter_constraint = true +resharper_csharp_wrap_multiple_declaration_style = chop_always +resharper_csharp_wrap_parameters_style = chop_if_long +resharper_enforce_line_ending_style = true +resharper_force_attribute_style = join +resharper_formatter_off_tag = @formatter:off +resharper_formatter_on_tag = @formatter:on +resharper_formatter_tags_enabled = true +resharper_indent_nested_fixed_stmt = true +resharper_indent_nested_foreach_stmt = true +resharper_indent_nested_for_stmt = true +resharper_indent_nested_lock_stmt = true +resharper_indent_nested_usings_stmt = true +resharper_indent_nested_while_stmt = true +resharper_indent_preprocessor_if = outdent +resharper_indent_preprocessor_other = outdent +resharper_indent_preprocessor_region = outdent +resharper_keep_existing_declaration_parens_arrangement = false +resharper_keep_existing_embedded_arrangement = false +resharper_keep_existing_embedded_block_arrangement = true +resharper_keep_existing_expr_member_arrangement = false +resharper_keep_existing_invocation_parens_arrangement = false +resharper_keep_existing_property_patterns_arrangement = false +resharper_keep_existing_switch_expression_arrangement = false +resharper_local_function_body = expression_body +resharper_max_array_initializer_elements_on_line = 10 +resharper_max_enum_members_on_line = 1 +resharper_max_formal_parameters_on_line = 10 +resharper_max_invocation_arguments_on_line = 10 +resharper_method_or_operator_body = expression_body +resharper_object_creation_when_type_not_evident = target_typed +resharper_place_accessorholder_attribute_on_same_line = false +resharper_place_accessor_with_attrs_holder_on_single_line = true +resharper_place_expr_method_on_single_line = false +resharper_place_linq_into_on_new_line = false +resharper_place_simple_embedded_statement_on_same_line = false +resharper_place_simple_method_on_single_line = false +resharper_show_autodetect_configure_formatting_tip = false +resharper_space_within_slice_pattern = false +resharper_use_continuous_indent_inside_initializer_braces = false +resharper_use_indent_from_vs = false +resharper_wrap_array_initializer_style = chop_if_long +resharper_wrap_before_arrow_with_expressions = true +resharper_wrap_before_binary_pattern_op = false +resharper_wrap_chained_binary_expressions = chop_if_long +resharper_wrap_chained_binary_patterns = chop_if_long +resharper_xmldoc_blank_line_after_pi = false +resharper_xmldoc_indent_text = ZeroIndent + +resharper_arrange_attributes_highlighting = suggestion +resharper_arrange_constructor_or_destructor_body_highlighting = suggestion +resharper_arrange_default_value_when_type_not_evident_highlighting = suggestion +resharper_arrange_local_function_body_highlighting = suggestion +resharper_arrange_method_or_operator_body_highlighting = hint +resharper_arrange_null_checking_pattern_highlighting = suggestion +resharper_arrange_object_creation_when_type_not_evident_highlighting = suggestion +resharper_arrange_redundant_parentheses_highlighting = hint +resharper_arrange_this_qualifier_highlighting = hint +resharper_auto_property_can_be_made_get_only_global_highlighting = none +resharper_built_in_type_reference_style_for_member_access_highlighting = hint +resharper_built_in_type_reference_style_highlighting = hint +resharper_check_namespace_highlighting = none +resharper_class_never_instantiated_global_highlighting = none +resharper_class_with_virtual_members_never_inherited_global_highlighting = none +resharper_collection_never_updated_global_highlighting = none +resharper_co_variant_array_conversion_highlighting = hint +resharper_empty_for_statement_highlighting = none +resharper_for_can_be_converted_to_foreach_highlighting = none +resharper_loop_can_be_converted_to_query_highlighting = none +resharper_member_can_be_private_global_highlighting = none +resharper_parameter_hides_member_highlighting = none +resharper_possible_multiple_enumeration_highlighting = suggestion +resharper_redundant_base_qualifier_highlighting = warning +resharper_return_value_of_pure_method_is_not_used_highlighting = none +resharper_separate_local_functions_with_jump_statement_highlighting = none +resharper_static_member_in_generic_type_highlighting = none +resharper_suggest_base_type_for_parameter_in_constructor_highlighting = suggestion +resharper_suggest_var_or_type_built_in_types_highlighting = hint +resharper_suggest_var_or_type_elsewhere_highlighting = hint +resharper_suggest_var_or_type_simple_types_highlighting = hint +resharper_switch_expression_handles_some_known_enum_values_with_exception_in_default_highlighting = suggestion +resharper_switch_statement_handles_some_known_enum_values_with_default_highlighting = suggestion +resharper_switch_statement_missing_some_enum_cases_no_default_highlighting = suggestion +resharper_unused_auto_property_accessor_global_highlighting = none +resharper_unused_auto_property_accessor_local_highlighting = none +resharper_unused_member_global_highlighting = none +resharper_unused_method_return_value_global_highlighting = none +resharper_web_config_module_not_resolved_highlighting = warning +resharper_web_config_type_not_resolved_highlighting = warning +resharper_web_config_wrong_module_highlighting = warning + +[{*Request.cs,*Response.cs,*Models.cs,*Endpoint.cs}] dotnet_diagnostic.CS8618.severity = none \ No newline at end of file diff --git a/templates/project/Source/Features/SayHello/Request.cs b/templates/project/Source/Features/SayHello/Request.cs index c1cdc11..f28b0a1 100644 --- a/templates/project/Source/Features/SayHello/Request.cs +++ b/templates/project/Source/Features/SayHello/Request.cs @@ -7,7 +7,7 @@ sealed class Request public string FirstName { get; set; } public string LastName { get; set; } - sealed class Validator : Validator + internal sealed class Validator : Validator { public Validator() { diff --git a/templates/project/Source/Metadata.cs b/templates/project/Source/Meta.cs similarity index 75% rename from templates/project/Source/Metadata.cs rename to templates/project/Source/Meta.cs index ad3ba8c..c354df1 100644 --- a/templates/project/Source/Metadata.cs +++ b/templates/project/Source/Meta.cs @@ -1,4 +1,5 @@ global using FastEndpoints; +global using FastEndpoints.Swagger; using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Tests")] \ No newline at end of file diff --git a/templates/project/Source/MyProject.csproj b/templates/project/Source/MyProject.csproj index 11e577b..a75634d 100644 --- a/templates/project/Source/MyProject.csproj +++ b/templates/project/Source/MyProject.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable Exe @@ -10,9 +10,9 @@ - - - + + + diff --git a/templates/project/Source/Program.cs b/templates/project/Source/Program.cs index 9aeee9b..18d4330 100644 --- a/templates/project/Source/Program.cs +++ b/templates/project/Source/Program.cs @@ -1,5 +1,3 @@ -using FastEndpoints.Swagger; - var bld = WebApplication.CreateBuilder(args); bld.Services .AddFastEndpoints() diff --git a/templates/test/Tests/Metadata.cs b/templates/project/Tests/Meta.cs similarity index 67% rename from templates/test/Tests/Metadata.cs rename to templates/project/Tests/Meta.cs index 59f003f..ffa8295 100644 --- a/templates/test/Tests/Metadata.cs +++ b/templates/project/Tests/Meta.cs @@ -1,7 +1,8 @@ global using FastEndpoints; global using FastEndpoints.Testing; global using FluentAssertions; +global using Microsoft.Extensions.DependencyInjection; global using System.Net; global using Xunit; global using Xunit.Abstractions; -global using Xunit.Priority; +global using Xunit.Priority; \ No newline at end of file diff --git a/templates/project/Tests/SayHello/Fixture.cs b/templates/project/Tests/SayHello/Fixture.cs index f8af117..f05b522 100644 --- a/templates/project/Tests/SayHello/Fixture.cs +++ b/templates/project/Tests/SayHello/Fixture.cs @@ -1,9 +1,7 @@ namespace Tests.SayHello; -public class Fixture : TestFixture +public class Fixture(IMessageSink s) : TestFixture(s) { - public Fixture(IMessageSink s) : base(s) { } - protected override Task SetupAsync() { // place one-time setup for the test-class here @@ -20,4 +18,4 @@ protected override Task TearDownAsync() // do cleanups here return Task.CompletedTask; } -} +} \ No newline at end of file diff --git a/templates/project/Tests/SayHello/Tests.cs b/templates/project/Tests/SayHello/Tests.cs index eb99444..9e2d22f 100644 --- a/templates/project/Tests/SayHello/Tests.cs +++ b/templates/project/Tests/SayHello/Tests.cs @@ -2,10 +2,8 @@ namespace Tests.SayHello; -public class Tests : TestClass +public class Tests(Fixture f, ITestOutputHelper o) : TestClass(f, o) { - public Tests(Fixture f, ITestOutputHelper o) : base(f, o) { } - [Fact, Priority(1)] public async Task Invalid_User_Input() { diff --git a/templates/project/Tests/Tests.csproj b/templates/project/Tests/Tests.csproj index 0dcaf0a..aa88ac3 100644 --- a/templates/project/Tests/Tests.csproj +++ b/templates/project/Tests/Tests.csproj @@ -1,18 +1,18 @@  - net7.0 + net8.0 enable enable true - + - - - + + + diff --git a/templates/project/Tests/Metadata.cs b/templates/test/Tests/Meta.cs similarity index 100% rename from templates/project/Tests/Metadata.cs rename to templates/test/Tests/Meta.cs diff --git a/templates/test/Tests/Sample/SampleTests.cs b/templates/test/Tests/Sample/SampleTests.cs index f90f83c..d7f7919 100644 --- a/templates/test/Tests/Sample/SampleTests.cs +++ b/templates/test/Tests/Sample/SampleTests.cs @@ -1,14 +1,9 @@ namespace Tests.Sample; -public class MyFixture : TestFixture -{ - public MyFixture(IMessageSink s) : base(s) { } -} +public class MyFixture(IMessageSink s) : TestFixture(s) {} -public class SampleTests : TestClass +public class SampleTests(MyFixture f, ITestOutputHelper o) : TestClass(f, o) { - public SampleTests(MyFixture f, ITestOutputHelper o) : base(f, o) { } - [Fact] public void Sample_Test() { diff --git a/templates/test/Tests/Tests.csproj b/templates/test/Tests/Tests.csproj index f4d326a..c0050b8 100644 --- a/templates/test/Tests/Tests.csproj +++ b/templates/test/Tests/Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable true @@ -9,11 +9,11 @@ - + - - - + + +