DisplayFormat { public static String longGlucoseLine(final RawDisplayData raw) { return raw.sSgv + raw.sDirection + " " + deltaSymbol() + (new SmallestDoubleString(raw.sDelta)).minimise(8) + " (" + shortTimeSince(raw.datetime) + ")"; }  static String deltaSymbol(); static String verticalSeparatorSymbol(); static String basalRateSymbol(); static String shortTimeSince(final long refTime); static String shortTrend(final RawDisplayData raw); static String longGlucoseLine(final RawDisplayData raw); static String longDetailsLine(final RawDisplayData raw); static Pair<String, String> detailedIob(RawDisplayData raw); static Pair<String, String> detailedCob(final RawDisplayData raw); static final int MAX_FIELD_LEN_LONG; static final int MAX_FIELD_LEN_SHORT; static final int MIN_FIELD_LEN_COB; static final int MIN_FIELD_LEN_IOB; }
@Test public void longGlucoseLine() { assertThat(DisplayFormat.longGlucoseLine(rawSgv("125",2, "1.2")), is("125→ Δ1.2 (2')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("97",11, "5.2")), is("97↗ Δ5.2 (11')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("110",12,"0.7")), is("110→ Δ.7 (12')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("65",10,"7.0")), is("65↗ Δ7 (10')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("215",14,"-5.0")), is("215↘ Δ-5 (14')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("8.3",13,"-5.1")), is("8.3↘ Δ-5.1 (13')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("6.8",15,"10.83")), is("6.8↑ Δ10.83 (15')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("13.2",10,"-11.78")), is("13.2↓ Δ-11.78 (10')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("3.9",3, "2.549")), is("3.9→ Δ2.549 (3')")); assertThat(DisplayFormat.longGlucoseLine(rawSgv("11.1",1, "-15.563")), is("11.1↓ Δ-15.563 (1')")); }