Class SelectorResolver.Match

    • Method Detail

      • exact

        public static SelectorResolver.Match exact​(TestDescriptor testDescriptor)
        Factory for creating an exact match without any children.
        Parameters:
        testDescriptor - the resolved TestDescriptor; never null
        Returns:
        a match that contains the supplied TestDescriptor; never null
      • exact

        public static SelectorResolver.Match exact​(TestDescriptor testDescriptor,
                                                   Supplier<Set<? extends DiscoverySelector>> childSelectorsSupplier)
        Factory for creating an exact match with potential children.
        Parameters:
        testDescriptor - the resolved TestDescriptor; never null
        childSelectorsSupplier - a Supplier of children selectors that will be resolved when this match is expanded; never null
        Returns:
        a match that contains the supplied TestDescriptor; never null
      • partial

        public static SelectorResolver.Match partial​(TestDescriptor testDescriptor)
        Factory for creating a partial match without any children.
        Parameters:
        testDescriptor - the resolved TestDescriptor; never null
        Returns:
        a match that contains the supplied TestDescriptor; never null
      • partial

        public static SelectorResolver.Match partial​(TestDescriptor testDescriptor,
                                                     Supplier<Set<? extends DiscoverySelector>> childSelectorsSupplier)
        Factory for creating a partial match with potential children.
        Parameters:
        testDescriptor - the resolved TestDescriptor; never null
        childSelectorsSupplier - a Supplier of children selectors that will be resolved when this match is expanded; never null
        Returns:
        a match that contains the supplied TestDescriptor; never null
      • isExact

        public boolean isExact()
        Whether this match is exact.
        Returns:
        true if this match is exact; false if it's partial
      • getTestDescriptor

        public TestDescriptor getTestDescriptor()
        Get the contained TestDescriptor.
        Returns:
        the contained TestDescriptor; never null
      • expand

        public Set<? extends DiscoverySelector> expand()
        Expand this match in order to resolve the children of the contained TestDescriptor.
        Returns:
        the set of DiscoverySelectors that represent the children of the contained TestDescriptor; never null