Package org.springframework.boot.loader.util

Examples of org.springframework.boot.loader.util.AsciiBytes.substring()


  }

  @Test
  public void substringFromBeingIndex() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1).toString(), equalTo("BCD"));
    assertThat(abcd.substring(2).toString(), equalTo("CD"));
    assertThat(abcd.substring(3).toString(), equalTo("D"));
    assertThat(abcd.substring(4).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
View Full Code Here


  @Test
  public void substringFromBeingIndex() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1).toString(), equalTo("BCD"));
    assertThat(abcd.substring(2).toString(), equalTo("CD"));
    assertThat(abcd.substring(3).toString(), equalTo("D"));
    assertThat(abcd.substring(4).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(5);
View Full Code Here

  @Test
  public void substringFromBeingIndex() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1).toString(), equalTo("BCD"));
    assertThat(abcd.substring(2).toString(), equalTo("CD"));
    assertThat(abcd.substring(3).toString(), equalTo("D"));
    assertThat(abcd.substring(4).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(5);
  }
View Full Code Here

  public void substringFromBeingIndex() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1).toString(), equalTo("BCD"));
    assertThat(abcd.substring(2).toString(), equalTo("CD"));
    assertThat(abcd.substring(3).toString(), equalTo("D"));
    assertThat(abcd.substring(4).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(5);
  }
View Full Code Here

    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1).toString(), equalTo("BCD"));
    assertThat(abcd.substring(2).toString(), equalTo("CD"));
    assertThat(abcd.substring(3).toString(), equalTo("D"));
    assertThat(abcd.substring(4).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(5);
  }

  @Test
View Full Code Here

    assertThat(abcd.substring(1).toString(), equalTo("BCD"));
    assertThat(abcd.substring(2).toString(), equalTo("CD"));
    assertThat(abcd.substring(3).toString(), equalTo("D"));
    assertThat(abcd.substring(4).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(5);
  }

  @Test
  public void substring() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
View Full Code Here

  }

  @Test
  public void substring() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0, 4).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1, 3).toString(), equalTo("BC"));
    assertThat(abcd.substring(3, 4).toString(), equalTo("D"));
    assertThat(abcd.substring(3, 3).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(3, 5);
View Full Code Here

  @Test
  public void substring() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0, 4).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1, 3).toString(), equalTo("BC"));
    assertThat(abcd.substring(3, 4).toString(), equalTo("D"));
    assertThat(abcd.substring(3, 3).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(3, 5);
  }
View Full Code Here

  @Test
  public void substring() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0, 4).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1, 3).toString(), equalTo("BC"));
    assertThat(abcd.substring(3, 4).toString(), equalTo("D"));
    assertThat(abcd.substring(3, 3).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(3, 5);
  }
View Full Code Here

  public void substring() throws Exception {
    AsciiBytes abcd = new AsciiBytes(new byte[] { 65, 66, 67, 68 });
    assertThat(abcd.substring(0, 4).toString(), equalTo("ABCD"));
    assertThat(abcd.substring(1, 3).toString(), equalTo("BC"));
    assertThat(abcd.substring(3, 4).toString(), equalTo("D"));
    assertThat(abcd.substring(3, 3).toString(), equalTo(""));
    this.thrown.expect(IndexOutOfBoundsException.class);
    abcd.substring(3, 5);
  }

  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.