Exemplo n.º 1
0
 public void Truncate_Right_To_Left()
 {
     var truncate = new Truncate(345, TruncateMethod.RightToLeft);
       Assert.IsTrue(truncate.CanTruncate());
       Assert.AreEqual(34, truncate.NextValue());
       Assert.IsTrue(truncate.CanTruncate());
       Assert.AreEqual(3, truncate.NextValue());
       Assert.IsFalse(truncate.CanTruncate());
       Assert.AreEqual(3, truncate.CurrentValue());
 }
Exemplo n.º 2
0
 public void Truncate_Left_To_Right()
 {
     var truncate = new Truncate(234, TruncateMethod.LeftToRight);
       Assert.IsTrue(truncate.CanTruncate());
       Assert.AreEqual(34, truncate.NextValue());
       Assert.IsTrue(truncate.CanTruncate());
       Assert.AreEqual(4, truncate.NextValue());
       Assert.IsFalse(truncate.CanTruncate());
       Assert.AreEqual(4, truncate.CurrentValue());
 }