@Test public void frameFileRegionIsTakenDirectlyFromContext() { final StackFrameContext contextWithoutRegion = mock(StackFrameContext.class); when(contextWithoutRegion.getFileRegion()).thenReturn(Optional.empty()); final StackFrameContext contextWithRegion = mock(StackFrameContext.class); when(contextWithRegion.getFileRegion()) .thenReturn(Optional.of(new FileRegion(new FilePosition(3, 2, 42), new FilePosition(3, 5, 99)))); assertThat(new StackFrame("frame", FrameCategory.KEYWORD, 42, contextWithoutRegion).getFileRegion()).isEmpty(); assertThat(new StackFrame("frame", FrameCategory.KEYWORD, 42, contextWithRegion).getFileRegion()) .contains(new FileRegion(new FilePosition(3, 2, 42), new FilePosition(3, 5, 99))); }
public Optional<FileRegion> getFileRegion() { return context.getFileRegion(); }
StackFrame { public Optional<FileRegion> getFileRegion() { return context.getFileRegion(); } }
StackFrame { public Optional<FileRegion> getFileRegion() { return context.getFileRegion(); } StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context,
            final Set<URI> loadedResources);   StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context);   StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context,
            final Supplier<URI> contextPathSupplier); private  StackFrame(final String name, final FrameCategory category, final int level,
            final StackFrameContext context, final Supplier<URI> contextPathSupplier, final Set<URI> loadedResources); }
StackFrame { public Optional<FileRegion> getFileRegion() { return context.getFileRegion(); } StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context,
            final Set<URI> loadedResources);   StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context);   StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context,
            final Supplier<URI> contextPathSupplier); private  StackFrame(final String name, final FrameCategory category, final int level,
            final StackFrameContext context, final Supplier<URI> contextPathSupplier, final Set<URI> loadedResources); String getName(); boolean hasCategory(final FrameCategory category); boolean isSuiteContext(); boolean isSuiteDirectoryContext(); boolean isSuiteFileContext(); boolean isTestContext(); Optional<URI> getCurrentSourcePath(); Optional<URI> getContextPath(); Optional<FileRegion> getFileRegion(); boolean isLibraryKeywordFrame(); boolean isErroneous(); String getErrorMessage(); StackFrameVariables getVariables(); Optional<StackVariablesDelta> getLastDelta(); }
StackFrame { public Optional<FileRegion> getFileRegion() { return context.getFileRegion(); } StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context,
            final Set<URI> loadedResources);   StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context);   StackFrame(final String name, final FrameCategory category, final int level, final StackFrameContext context,
            final Supplier<URI> contextPathSupplier); private  StackFrame(final String name, final FrameCategory category, final int level,
            final StackFrameContext context, final Supplier<URI> contextPathSupplier, final Set<URI> loadedResources); String getName(); boolean hasCategory(final FrameCategory category); boolean isSuiteContext(); boolean isSuiteDirectoryContext(); boolean isSuiteFileContext(); boolean isTestContext(); Optional<URI> getCurrentSourcePath(); Optional<URI> getContextPath(); Optional<FileRegion> getFileRegion(); boolean isLibraryKeywordFrame(); boolean isErroneous(); String getErrorMessage(); StackFrameVariables getVariables(); Optional<StackVariablesDelta> getLastDelta();  }