Beispiel #1
0
        public void TestUnmarshalPrimitiveMap()
        {
            XmlPrimitiveMapMarshaler marshaler = new XmlPrimitiveMapMarshaler();

            byte[] rawBytes = Encoding.UTF8.GetBytes(xmlString);

            IPrimitiveMap result = marshaler.Unmarshal(rawBytes);

            Assert.IsNotNull(result);

            Assert.IsTrue(result.Contains("BOOL"));
            Assert.IsTrue(result.Contains("BYTES"));
            Assert.IsTrue(result.Contains("STRING"));
            Assert.IsTrue(result.Contains("LONG"));
            Assert.IsTrue(result.Contains("FLOAT"));
            Assert.IsTrue(result.Contains("INT"));
            Assert.IsTrue(result.Contains("BYTE"));
            Assert.IsTrue(result.Contains("SHORT"));
            Assert.IsTrue(result.Contains("DOUBLE"));
            Assert.IsTrue(result.Contains("CHAR"));
        }