@Test public void startsAtIsNotAvailableBeforeStartingIteration() throws Exception { final HeaderPartIterator sut = createSut(""); try { sut.startsAt(); fail("Should not retrieve start position before starting iteration"); } catch(final IllegalStateException e) { assertThat(e.getMessage(),equalTo("Iteration has not started")); } }
int startsAt() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.partStart; }
HeaderPartIterator implements Iterator<String> { int startsAt() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.partStart; } }
HeaderPartIterator implements Iterator<String> { int startsAt() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.partStart; } private  HeaderPartIterator(final String str); }
HeaderPartIterator implements Iterator<String> { int startsAt() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.partStart; } private  HeaderPartIterator(final String str); @Override boolean hasNext(); @Override String next(); @Override void remove(); }
HeaderPartIterator implements Iterator<String> { int startsAt() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.partStart; } private  HeaderPartIterator(final String str); @Override boolean hasNext(); @Override String next(); @Override void remove();  }