Class TicketTabMapper

java.lang.Object
com.example.breeze_seas.TicketTabMapper

public final class TicketTabMapper extends Object
Minimal helper for classifying ticket states into Tickets tabs.

This keeps tab-mapping logic out of UI tests so it can be validated with plain JUnit.

  • Method Details

    • mapToTab

      @NonNull public static TicketTabMapper.TicketTab mapToTab(@NonNull TicketTabMapper.TicketState state)
      Maps a ticket state to the Tickets tab where it should appear.
      Parameters:
      state - Ticket state being classified.
      Returns:
      The tab that should contain the provided state.
    • filterStatesForTab

      @NonNull public static List<TicketTabMapper.TicketState> filterStatesForTab(@NonNull List<TicketTabMapper.TicketState> states, @NonNull TicketTabMapper.TicketTab tab)
      Filters a list of ticket states down to only those that belong to the requested tab.
      Parameters:
      states - Ticket states to filter.
      tab - Target tab to keep.
      Returns:
      A new list containing only states that belong to the requested tab.