コード例 #1
0
        public void Deserialize_SampleFile_NumericFormat()
        {
            int testNr = 0;

            // Create an instance of the XmlSerializer specifying type and namespace.
            TestSuiteXml ts = DeserializeSample();

            // Check the properties of the object.
            Assert.That(ts.Tests[testNr].Constraints[0], Is.TypeOf <MatchPatternXml>());

            NumericFormatXml format = ((MatchPatternXml)ts.Tests[testNr].Constraints[0]).NumericFormat;

            Assert.That(format.DecimalDigits, Is.EqualTo(4));
            Assert.That(format.DecimalSeparator, Is.EqualTo(","));
            Assert.That(format.GroupSeparator, Is.EqualTo(""));
        }
コード例 #2
0
 public MatchPatternXml()
 {
     NumericFormat  = new NumericFormatXml(true);
     CurrencyFormat = new CurrencyFormatXml(true);
 }