@Test public void iteratorIsReturned_withAllTheVariables() { final StackFrameVariable v1 = new StackFrameVariable(VariableScope.GLOBAL, true, "var1", "int", 5); final StackFrameVariable v2 = new StackFrameVariable(VariableScope.TEST_SUITE, false, "var2", "int", 6); final StackFrameVariable v3 = new StackFrameVariable(VariableScope.TEST_CASE, false, "var3", "int", 7); final StackFrameVariable v4 = new StackFrameVariable(VariableScope.LOCAL, false, "var4", "int", 8); final Map<String, StackFrameVariable> vars = new HashMap<>(); vars.put("var1", v1); vars.put("var2", v2); vars.put("var3", v3); vars.put("var4", v4); final StackFrameVariables variables = new StackFrameVariables(vars); final Iterator<StackFrameVariable> iterator = variables.iterator(); final List<StackFrameVariable> iteratorContent = newArrayList(iterator); assertThat(iteratorContent).containsOnly(v1, v2, v3, v4); }
@Override public Iterator<StackFrameVariable> iterator() { return variables.values().iterator(); }
StackFrameVariables implements Iterable<StackFrameVariable> { @Override public Iterator<StackFrameVariable> iterator() { return variables.values().iterator(); } }
StackFrameVariables implements Iterable<StackFrameVariable> { @Override public Iterator<StackFrameVariable> iterator() { return variables.values().iterator(); } @VisibleForTesting  StackFrameVariables(final Map<String, StackFrameVariable> variables); }
StackFrameVariables implements Iterable<StackFrameVariable> { @Override public Iterator<StackFrameVariable> iterator() { return variables.values().iterator(); } @VisibleForTesting  StackFrameVariables(final Map<String, StackFrameVariable> variables); static StackFrameVariables newNonLocalVariables(final Map<Variable, VariableTypedValue> variables); static StackFrameVariables newLocalVariables(final StackFrameVariables parentVars,
            final boolean preserveLocals); @Override Iterator<StackFrameVariable> iterator(); Map<String, StackFrameVariable> getVariables(); }
StackFrameVariables implements Iterable<StackFrameVariable> { @Override public Iterator<StackFrameVariable> iterator() { return variables.values().iterator(); } @VisibleForTesting  StackFrameVariables(final Map<String, StackFrameVariable> variables); static StackFrameVariables newNonLocalVariables(final Map<Variable, VariableTypedValue> variables); static StackFrameVariables newLocalVariables(final StackFrameVariables parentVars,
            final boolean preserveLocals); @Override Iterator<StackFrameVariable> iterator(); Map<String, StackFrameVariable> getVariables();  }