Ejemplo n.º 1
0
 public void GetZonedDecimal_Returns_Valid_Negatives()
 {
     Assert.Equal("0219}", ZonedDecimalConverter.GetZonedDecimal(-21.90m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219J", ZonedDecimalConverter.GetZonedDecimal(-21.91m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219K", ZonedDecimalConverter.GetZonedDecimal(-21.92m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219L", ZonedDecimalConverter.GetZonedDecimal(-21.93m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219M", ZonedDecimalConverter.GetZonedDecimal(-21.94m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219N", ZonedDecimalConverter.GetZonedDecimal(-21.95m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219O", ZonedDecimalConverter.GetZonedDecimal(-21.96m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219P", ZonedDecimalConverter.GetZonedDecimal(-21.97m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219Q", ZonedDecimalConverter.GetZonedDecimal(-21.98m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219R", ZonedDecimalConverter.GetZonedDecimal(-21.99m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
 }
Ejemplo n.º 2
0
 public void GetZonedDecimal_Returns_Valid_Positives()
 {
     Assert.Equal("0219{", ZonedDecimalConverter.GetZonedDecimal(21.90m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219A", ZonedDecimalConverter.GetZonedDecimal(21.91m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219B", ZonedDecimalConverter.GetZonedDecimal(21.92m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219C", ZonedDecimalConverter.GetZonedDecimal(21.93m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219D", ZonedDecimalConverter.GetZonedDecimal(21.94m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219E", ZonedDecimalConverter.GetZonedDecimal(21.95m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219F", ZonedDecimalConverter.GetZonedDecimal(21.96m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219G", ZonedDecimalConverter.GetZonedDecimal(21.97m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219H", ZonedDecimalConverter.GetZonedDecimal(21.98m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
     Assert.Equal("0219I", ZonedDecimalConverter.GetZonedDecimal(21.99m, 3, 2, ZonedDecimalConverter.RoundingOperation.Truncate));
 }