@Test public void testRemoveFrame() { String exception = "NullPointerOfCourse"; String message = "because why not!"; CrashStackTrace st = new CrashStackTrace(exception, message); st.addFrame(new Frame("clazz", "method")); st.addFrame(new Frame("clazz2", "method2")); assertThat(st.highestFrameLevel(), equalTo(2)); assertThat(st, iterableWithSize(2)); st.removeFrame(2); assertThat(st.highestFrameLevel(), equalTo(1)); assertThat(st, iterableWithSize(1)); st.removeFrame(1); assertThat(st.highestFrameLevel(), equalTo(0)); assertThat(st, iterableWithSize(0)); }
public Frame removeFrame(int level) { return frames.remove(level - 1); }
CrashStackTrace implements Iterable<Frame> { public Frame removeFrame(int level) { return frames.remove(level - 1); } }
CrashStackTrace implements Iterable<Frame> { public Frame removeFrame(int level) { return frames.remove(level - 1); } CrashStackTrace();  CrashStackTrace(String exceptionClass, String errorMessage);  CrashStackTrace(String exceptionClass, String errorMessage, CrashStackTrace cause); }
CrashStackTrace implements Iterable<Frame> { public Frame removeFrame(int level) { return frames.remove(level - 1); } CrashStackTrace();  CrashStackTrace(String exceptionClass, String errorMessage);  CrashStackTrace(String exceptionClass, String errorMessage, CrashStackTrace cause); String getExceptionClass(); void setExceptionClass(String exceptionClass); String getErrorMessage(); void setErrorMessage(String errorMessage); CrashStackTrace getCause(); void setCause(CrashStackTrace stackTrace); @Override Iterator<Frame> iterator(); Frame removeFrame(int level); void addFrame(Frame frame); int highestFrameLevel(); Frame getFrame(int level); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); }
CrashStackTrace implements Iterable<Frame> { public Frame removeFrame(int level) { return frames.remove(level - 1); } CrashStackTrace();  CrashStackTrace(String exceptionClass, String errorMessage);  CrashStackTrace(String exceptionClass, String errorMessage, CrashStackTrace cause); String getExceptionClass(); void setExceptionClass(String exceptionClass); String getErrorMessage(); void setErrorMessage(String errorMessage); CrashStackTrace getCause(); void setCause(CrashStackTrace stackTrace); @Override Iterator<Frame> iterator(); Frame removeFrame(int level); void addFrame(Frame frame); int highestFrameLevel(); Frame getFrame(int level); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }