Esempio n. 1
0
        public void RoundTripConvert()
        {
            var serializer = new SizeValueSerializer();
            var size       = new Size(1.234, 5.678);
            var obj        = serializer.ConvertFromString(serializer.ConvertToString(size, null), null);

            Assert.AreEqual(size, obj);
        }
Esempio n. 2
0
        public void ConvertToStringShouldThrowExceptionWhenInvalidType()
        {
            var serializer = new SizeValueSerializer();

            serializer.ConvertToString(10, null);
        }