public void WriteXmlSubtree(XmlWriter writer)
 {
     writer.WriteStartElement(XmlStrings.DoublesGen);
     writer.WriteAttributeString(XmlStrings.NameAttr, Name);
     writer.WriteStartElement(XmlStrings.ParamsNode);
     writer.WriteAttributeString("min", Min.ToString());
     writer.WriteAttributeString("max", Max.ToString());
     writer.WriteAttributeString("decimals", Decimals.ToString());
     writer.WriteEndElement();
     writer.WriteEndElement();
 }
Exemple #2
0
        [TestMethod] public void ToStringTest()
        {
            void action(decimal x)
            {
                Assert.AreEqual(x.ToString(UseCulture.Invariant), Decimals.ToString(x));
            }

            action(GetRandom.Decimal());
            action(1234.567m);
            action(1234567m);
            action(123456.7m);
            Assert.AreEqual(d1.ToString(UseCulture.English), Decimals.ToString(d1));
        }
Exemple #3
0
 public void ToStringTest()
 {
     Assert.AreEqual("Answer: 2.75", x.ToString());
     Assert.AreEqual("Answer: 1.25", y.ToString());
 }