Пример #1
0
        public void Test___Method_Convert___DateTime()
        {
            var testee = new ParseConverter <DateTime>();

            Assert.AreEqual(DateTime.MinValue, testee.Convert("0001-01-01 00:00:00"));
        }
Пример #2
0
        public void Test___Method_Convert___Guid()
        {
            var testee = new ParseConverter <Guid>();

            Assert.AreEqual(Guid.Empty, testee.Convert("00000000-0000-0000-0000-000000000000"));
        }
Пример #3
0
        public void Test___Method_Convert___ushort()
        {
            var testee = new ParseConverter <ushort>();

            Assert.AreEqual((ushort)1, testee.Convert("1"));
        }
Пример #4
0
        public void Test___Method_Convert___byte()
        {
            var testee = new ParseConverter <byte>();

            Assert.AreEqual((byte)1, testee.Convert("1"));
        }
Пример #5
0
        public void Test___Method_Convert___char()
        {
            var testee = new ParseConverter <char>();

            Assert.AreEqual(0x20, testee.Convert(" "));
        }
Пример #6
0
        public void Test___Method_Convert___bool()
        {
            var testee = new ParseConverter <bool>();

            Assert.AreEqual(true, testee.Convert("true"));
        }