Tests.ORecordParsingTests.TestStringDeserialization C# (CSharp) Method

TestStringDeserialization() private method

private TestStringDeserialization ( ) : void
return void
        public void TestStringDeserialization()
        {
            string raw = "simple:\"whoa this is awesome\",singleQuoted:\"a" + "\\" + "\"\",doubleQuotes:\"" + "\\" + "\"adsf" + "\\" + "\"\",twoBackslashes:\"" + "\\a" + "\\a" + "\"";

            ORecord record = new ORecord(ORecordType.Document, 0, UTF8Encoding.UTF8.GetBytes(raw));

            Assert.IsTrue(record.Fields["simple"].GetType() == typeof(string));
            Assert.IsTrue((string)record.Fields["simple"] == "whoa this is awesome");

            Assert.IsTrue(record.Fields["singleQuoted"].GetType() == typeof(string));
            Assert.IsTrue((string)record.Fields["singleQuoted"] == "a\"");

            Assert.IsTrue(record.Fields["doubleQuotes"].GetType() == typeof(string));
            Assert.IsTrue((string)record.Fields["doubleQuotes"] == "\"adsf\"");

            Assert.IsTrue(record.Fields["twoBackslashes"].GetType() == typeof(string));
            Assert.IsTrue((string)record.Fields["twoBackslashes"] == "\\a\\a");
        }