Пример #1
0
        public void BuildXmlSerializer_ArrayType_ReturnsXmlSerializer()
        {
            var           arr = Helper.GeStringArray();
            XmlSerializer ser = XSerializer.BuildXmlSerializer(arr);

            Assert.IsNotNull(ser);
        }
Пример #2
0
        public void BuildXmlSerializer_CollectionType_ReturnsXmlSerializer()
        {
            ICollection <string> col = Helper.GeStringArray();

            XmlSerializer ser = XSerializer.BuildXmlSerializer(col);

            Assert.IsNotNull(ser);
        }
Пример #3
0
        public void BuildXmlSerializer_ObjectType_ReturnsXmlSerializer()
        {
            SimpleFake fake = new SimpleFake();

            XmlSerializer ser = XSerializer.BuildXmlSerializer(fake);

            Assert.IsNotNull(ser);
        }
Пример #4
0
        public void BuildXmlSerializer_StructType_ReturnsXmlSerializer()
        {
            var stru = new SampleStruct
            {
                Count     = 5,
                FirstName = "Bob",
                LastName  = "Marly",
                Time      = DateTime.Now,
            };

            XmlSerializer ser = XSerializer.BuildXmlSerializer(stru);

            Assert.IsNotNull(ser);
        }
Пример #5
0
 public void BuildXmlSerializer_InvalidArgs_ThrowsArgumentException(object arg)
 {
     Assert.Throws <ArgumentException>(() => XSerializer.BuildXmlSerializer(arg));
 }