@Test public void GIVEN_steady_trend_WHEN_formatting_requested_THEN_returns_steady_character() { testee = new TrendFormatter(Trend.STEADY); assertEquals("\u279E", testee.format()); }
public String format() { String formatted = "-"; if (trend == Trend.RISING) { formatted = "\u279A"; } else if (trend == Trend.STEADY) { formatted = "\u279E"; } else if (trend == Trend.FALLING) { formatted = "\u2798"; } return formatted; }
TrendFormatter { public String format() { String formatted = "-"; if (trend == Trend.RISING) { formatted = "\u279A"; } else if (trend == Trend.STEADY) { formatted = "\u279E"; } else if (trend == Trend.FALLING) { formatted = "\u2798"; } return formatted; } }
TrendFormatter { public String format() { String formatted = "-"; if (trend == Trend.RISING) { formatted = "\u279A"; } else if (trend == Trend.STEADY) { formatted = "\u279E"; } else if (trend == Trend.FALLING) { formatted = "\u2798"; } return formatted; } TrendFormatter(Trend trend); }
TrendFormatter { public String format() { String formatted = "-"; if (trend == Trend.RISING) { formatted = "\u279A"; } else if (trend == Trend.STEADY) { formatted = "\u279E"; } else if (trend == Trend.FALLING) { formatted = "\u2798"; } return formatted; } TrendFormatter(Trend trend); String format(); }
TrendFormatter { public String format() { String formatted = "-"; if (trend == Trend.RISING) { formatted = "\u279A"; } else if (trend == Trend.STEADY) { formatted = "\u279E"; } else if (trend == Trend.FALLING) { formatted = "\u2798"; } return formatted; } TrendFormatter(Trend trend); String format();  }