Class AbstractListExpectation

    • Constructor Detail

      • AbstractListExpectation

        public AbstractListExpectation()
      • AbstractListExpectation

        public AbstractListExpectation​(ComparatorService comparatorService)
        Constructor allowing an alternate comparator service.
        Parameters:
        comparatorService -
    • Method Detail

      • getDefaultComparatorService

        protected static ComparatorService getDefaultComparatorService()
        Default comparator service
        Returns:
      • expectation

        public <T> void expectation​(T expectation,
                                    ExpectationComparator<?,​?> expectationComparator)
        Add an Expectation and specific user defined comparator to the ordered expectations
        Specified by:
        expectation in interface FlowExpectation
        Parameters:
        expectation -
        expectationComparator -
      • expectation

        public <T> void expectation​(T expectation,
                                    ExpectationComparator<?,​?> expectationComparator,
                                    java.lang.String description)
        Add an Expectation and specific user defined comparator to the ordered expectations and provide a specific description to help identity this expectation at runtime.
        Specified by:
        expectation in interface FlowExpectation
        Parameters:
        expectation -
        expectationComparator -
        description -
      • expectation

        public <T> void expectation​(T expectation)
        Add an Expectation to the ordered expectations
        Specified by:
        expectation in interface FlowExpectation
        Parameters:
        expectation -
      • expectation

        public <T> void expectation​(T expectation,
                                    java.lang.String description)
        Add an Expectation to the ordered expectations and provide a description to help identify this expectation at runtime.
        Specified by:
        expectation in interface FlowExpectation
        Parameters:
        expectation -
        description -
      • ignore

        public <T> void ignore​(T expectation)
        Add an ignore operation to the expectations order
        Specified by:
        ignore in interface FlowExpectation
        Parameters:
        expectation -
      • ignore

        public <T> void ignore​(T expectation,
                               java.lang.String description)
        Add an ignore operation to the expectations order and provide a description to help identify this expectation at runtime.
        Specified by:
        ignore in interface FlowExpectation
        Parameters:
        expectation -
        description -
      • addExpectation

        protected void addExpectation​(AbstractListExpectation.DefaultExpectation<?> defaultExpectation,
                                      java.lang.String description)
        Append the expectation to the already defined expectations
        Parameters:
        defaultExpectation -
        description -
      • allSatisfied

        public abstract void allSatisfied​(java.util.List<Capture<?>> captures)
        Have all expectations been satisfied
        Specified by:
        allSatisfied in interface FlowExpectation
        Parameters:
        captures - Ordered list of captured FlowElement invocations
        Throws:
        java.lang.AssertionError - if all expected invocations not satisfied
      • getExpectationDifference

        protected org.ikasan.testharness.flow.expectation.service.AbstractListExpectation.ExpectationDifference getExpectationDifference​(java.util.List<AbstractListExpectation.DefaultExpectation> expectations,
                                                                                                                                         java.util.List<Capture<?>> captures)
      • formatList

        protected java.lang.String formatList​(java.util.List<?> list)