示例#1
0
        public void ParseString_SendInStringAsByteArray_ReturnsCorrectString()
        {
            var byteArray = System.Text.Encoding.UTF8.GetBytes("hello world");
            var result    = PropertyValueParser.Parse <string>(byteArray);

            Assert.AreEqual("hello world", result);
        }
示例#2
0
        public void ParseDateTime_SendInDateAsFileTimeString_ReturnsCorrectDateTime()
        {
            var date   = new DateTime(2000, 1, 1);
            var result = PropertyValueParser.Parse <DateTime>(date.ToFileTime().ToString());

            Assert.AreEqual(date, result);
        }
示例#3
0
        public void ParseString_SendInString_ReturnsCorrectString()
        {
            var result = PropertyValueParser.Parse <string>("hello world");

            Assert.AreEqual("hello world", result);
        }