Exemple #1
0
        public void Deserialize_SampleFile_DefaultCurrencyFormat()
        {
            int testNr = 2;

            // 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>());

            CurrencyFormatXml format = ((MatchPatternXml)ts.Tests[testNr].Constraints[0]).CurrencyFormat;

            Assert.That(format.DecimalDigits, Is.EqualTo(2));
            Assert.That(format.DecimalSeparator, Is.EqualTo("."));
            Assert.That(format.GroupSeparator, Is.EqualTo(","));
            Assert.That(format.CurrencyPattern, Is.EqualTo(CurrencyPattern.Prefix));
            Assert.That(format.CurrencySymbol, Is.EqualTo("SEK"));
        }
Exemple #2
0
 public MatchPatternXml()
 {
     NumericFormat  = new NumericFormatXml(true);
     CurrencyFormat = new CurrencyFormatXml(true);
 }