Skip to content

Add @DisplayName and @Nested class grouping to all tests #29

@rammrain

Description

@rammrain

Summary

Improve test readability by adding JUnit 5 @DisplayName annotations to every test class and method, and grouping related tests using @Nested inner classes.

Requirements

  • Add @DisplayName to every test class and test method with a clear, human-readable description
  • Group related test methods into @Nested inner classes (e.g., by method under test, scenario category, or happy/sad path)
  • Apply consistently across all existing and new tests
  • Follow this pattern going forward for all issues that include test work

Example

@DisplayName("OrderService")
class OrderServiceTest {

    @Nested
    @DisplayName("createOrder")
    class CreateOrder {

        @Test
        @DisplayName("returns payment URL on success")
        void returnsPaymentUrlOnSuccess() { ... }

        @Test
        @DisplayName("throws validation exception when amount is missing")
        void throwsWhenAmountMissing() { ... }
    }
}

Testing

This issue is about tests — apply to all test classes created by other issues. Retrofit the existing MontonioSdkConfigurationTest as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions