Skip to content

shorten lengthy test names#927

Merged
SteveDunn merged 13 commits into
mainfrom
shorten-long-filenames
May 5, 2026
Merged

shorten lengthy test names#927
SteveDunn merged 13 commits into
mainfrom
shorten-long-filenames

Conversation

@SteveDunn

Copy link
Copy Markdown
Owner

Long Method Names Grouped by Enclosing Type
Bug625_EFCoreConverters_uses_wrong_marker_interface_name

Current: A_marker_interface_not_named_EfCoreConverters_is_still_referenced_and_that_name_is_used_in_the_generated_code (112 chars)

Total Length (Type + Method): 162 chars

Suggested: Handles_custom_marker_interface_name_in_generated_code
Bug610_Inconsistent_casting

Current: Setting_implicit_casting_to_primitive_in_global_config_should_not_write_a_primitive_cast_to_wrapper (95 chars)

Suggested: Global_config_implicit_cast_omits_primitive_cast

Current: Setting_implicit_casting_to_primitive_in_value_object_config_should_write_a_primitive_cast (85 chars)

Suggested: Local_config_implicit_cast_writes_primitive_cast
InternalDiagnosticsTests

Current: It_writes_diagnostics_if___ProduceDiagnostics_class_is_present_in_the_Vogen_namespace (84 chars)

Suggested: Writes_diagnostics_when_marker_class_present

Current: It_does_not_write_diagnostics_if___ProduceDiagnostics_class_is_not_present_in_the_Vogen_namespace (93 chars)

Suggested: No_diagnostics_when_marker_class_missing_in_namespace

Current: It_does_not_write_diagnostics_if___ProduceDiagnostics_class_is_not_present_anywhere (82 chars)

Suggested: No_diagnostics_when_marker_class_missing_entirely
ExplicitlySpecifyTypeInValueObjectAttributeAnalyzerTests

Current: Not_triggered_when_type_is_not_specified_and_global_config_says_it_should_not_be (81 chars)

Suggested: Not_triggered_when_global_config_disables_type_check
ValidationMethodAnalyzerTests

Current: Triggered_for_missing_method_and_assembly_level_config_specifies_a_different_type (80 chars)

Suggested: Triggered_when_assembly_config_specifies_different_type

Current: Triggered_for_missing_method_and_assembly_level_config_does_not_specify_a_different_type (86 chars)

Suggested: Triggered_when_assembly_config_has_no_type_override
GeneralTests

Current: Can_specify_both_swashbuckle_filter_and_MapType_extension_method_generation_for_openapi (87 chars)

Suggested: Can_generate_both_swashbuckle_filter_and_MapType

Current: ServiceStackDotTextConversion_generates_static_constructor_for_time_related_primitives (85 chars)

Suggested: ServiceStack_generates_static_ctor_for_time_types
ParsingTestsForPrimitives

Current: Does_not_generate_IParsable_for_a_class_wrapping_a_bool_because_it_implements_it_privately (88 chars)

Suggested: No_IParsable_for_bool_wrapper_with_private_implementation
Recommendations
1.
Shorten Test Names: Aim for descriptive but concise names. Avoid repeating "should", "does not", or describing the entire scenario in the method name if the class name or a comment can provide that context.
2.
Snapshot Filenames: Since Vogen uses [Type].[Method].verified.txt for snapshots, the combined length is critical. Keeping the sum of Type + Method under 100 characters is a safe target for Windows environments.
3.
Renaming Strategy: Use the suggested names above to refactor the tests. This will automatically shorten the resulting .verified.txt filenames and reduce the risk of PathTooLongException.

@SteveDunn
SteveDunn merged commit a6a2768 into main May 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant