@Test public void previousContextIsReturnedAsProvided() { final StackFrameContext previousContext1 = mock(StackFrameContext.class); final StackFrameContext previousContext2 = mock(StackFrameContext.class); final StackFrameContext previousContext3 = mock(StackFrameContext.class); final StackFrameContext previousContext4 = mock(StackFrameContext.class); final SetupTeardownContext context1 = new SetupTeardownContext(null, previousContext1); final SetupTeardownContext context2 = new SetupTeardownContext(URI.create("file: previousContext2, mock(RobotBreakpointSupplier.class)); final SetupTeardownContext context3 = new SetupTeardownContext(URI.create("file: previousContext3); final SetupTeardownContext context4 = new SetupTeardownContext(URI.create("file: previousContext4, mock(RobotBreakpointSupplier.class)); assertThat(context1.previousContext()).isSameAs(previousContext1); assertThat(context2.previousContext()).isSameAs(previousContext2); assertThat(context3.previousContext()).isSameAs(previousContext3); assertThat(context4.previousContext()).isSameAs(previousContext4); }
@Override public StackFrameContext previousContext() { return previousContext; }
SetupTeardownContext extends DefaultContext { @Override public StackFrameContext previousContext() { return previousContext; } }
SetupTeardownContext extends DefaultContext { @Override public StackFrameContext previousContext() { return previousContext; } SetupTeardownContext(final URI locationUri, final String keywordName, final int line,
            final StackFrameContext previousContext,
            final RobotBreakpointSupplier breakpointSupplier);   SetupTeardownContext(final String errorMessage, final StackFrameContext previousContext);   SetupTeardownContext(final URI locationUri, final int line, final String errorMessage,
            final StackFrameContext previousContext);   SetupTeardownContext(final URI locationUri, final int line, final String errorMessage,
            final StackFrameContext previousContext, final RobotBreakpointSupplier breakpointSupplier); private  SetupTeardownContext(final URI locationUri, final String keywordName, final int line,
            final String errorMessage, final StackFrameContext previousContext,
            final RobotBreakpointSupplier breakpointSupplier); }
SetupTeardownContext extends DefaultContext { @Override public StackFrameContext previousContext() { return previousContext; } SetupTeardownContext(final URI locationUri, final String keywordName, final int line,
            final StackFrameContext previousContext,
            final RobotBreakpointSupplier breakpointSupplier);   SetupTeardownContext(final String errorMessage, final StackFrameContext previousContext);   SetupTeardownContext(final URI locationUri, final int line, final String errorMessage,
            final StackFrameContext previousContext);   SetupTeardownContext(final URI locationUri, final int line, final String errorMessage,
            final StackFrameContext previousContext, final RobotBreakpointSupplier breakpointSupplier); private  SetupTeardownContext(final URI locationUri, final String keywordName, final int line,
            final String errorMessage, final StackFrameContext previousContext,
            final RobotBreakpointSupplier breakpointSupplier); @Override boolean isErroneous(); @Override Optional<String> getErrorMessage(); @Override Optional<URI> getAssociatedPath(); @Override Optional<FileRegion> getFileRegion(); @Override StackFrameContext moveTo(final RunningKeyword keyword, final RobotBreakpointSupplier breakpointSupplier); @Override StackFrameContext previousContext(); @Override Optional<RobotBreakpoint> getLineBreakpoint(); @Override Optional<RobotBreakpoint> getKeywordFailBreakpoint(final QualifiedKeywordName currentlyFailedKeyword); }
SetupTeardownContext extends DefaultContext { @Override public StackFrameContext previousContext() { return previousContext; } SetupTeardownContext(final URI locationUri, final String keywordName, final int line,
            final StackFrameContext previousContext,
            final RobotBreakpointSupplier breakpointSupplier);   SetupTeardownContext(final String errorMessage, final StackFrameContext previousContext);   SetupTeardownContext(final URI locationUri, final int line, final String errorMessage,
            final StackFrameContext previousContext);   SetupTeardownContext(final URI locationUri, final int line, final String errorMessage,
            final StackFrameContext previousContext, final RobotBreakpointSupplier breakpointSupplier); private  SetupTeardownContext(final URI locationUri, final String keywordName, final int line,
            final String errorMessage, final StackFrameContext previousContext,
            final RobotBreakpointSupplier breakpointSupplier); @Override boolean isErroneous(); @Override Optional<String> getErrorMessage(); @Override Optional<URI> getAssociatedPath(); @Override Optional<FileRegion> getFileRegion(); @Override StackFrameContext moveTo(final RunningKeyword keyword, final RobotBreakpointSupplier breakpointSupplier); @Override StackFrameContext previousContext(); @Override Optional<RobotBreakpoint> getLineBreakpoint(); @Override Optional<RobotBreakpoint> getKeywordFailBreakpoint(final QualifiedKeywordName currentlyFailedKeyword);  }