public void TestBuildMultipleDigits() { ValueBuilder builder = new ValueBuilder(); builder.PushDigit(1); builder.PushDigit(3); Assert.AreEqual(13, builder.GetValue()); }
public void TestTrailingSeparator() { ValueBuilder builder = new ValueBuilder(); builder.PushDigit(1); builder.PushDigit(2); builder.PushSeparator(); Assert.AreEqual(12, builder.GetValue()); }
public void TestLeadingSeparator() { ValueBuilder builder = new ValueBuilder(); builder.PushSeparator(); builder.PushDigit(1); builder.PushDigit(4); Assert.AreEqual(0.14M, builder.GetValue()); }
public void TestSingleDigitDecimal() { ValueBuilder builder = new ValueBuilder(); builder.PushDigit(1); builder.PushSeparator(); builder.PushDigit(2); Assert.AreEqual(1.2M, builder.GetValue()); }
public void TestMultiDigitDecimal() { ValueBuilder builder = new ValueBuilder(); builder.PushDigit(1); builder.PushDigit(2); builder.PushSeparator(); builder.PushDigit(3); builder.PushDigit(4); Assert.AreEqual(12.34M, builder.GetValue()); }
public void TestAfterClear() { ValueBuilder builder = new ValueBuilder(); builder.PushDigit(1); builder.Clear(); builder.PushDigit(2); Assert.AreEqual(2, builder.GetValue()); }
public void TestSingleDigit() { ValueBuilder builder = new ValueBuilder(); builder.PushDigit(1); Assert.AreEqual(1, builder.GetValue()); }
public void TestDoubleSeparator() { ValueBuilder builder = new ValueBuilder(); builder.PushSeparator(); builder.PushDigit(5); builder.PushSeparator(); }