Esempio n. 1
0
        public void Serialize()
        {
            var test = new MabiDictionary();

            test.SetBool("a bool", true);
            test.SetByte("a byte", 1);
            test.SetShort("a short", 2);
            test.SetInt("an int", 3);
            test.SetFloat("a float", 4);
            test.SetString("a string", "five, special chars :;");
            test.SetBin("a byte array", Encoding.ASCII.GetBytes("abc"));

            var test2 = test.ToString();

            Assert.Equal("a bool:b:1;a byte:1:1;a short:2:2;an int:4:3;a float:f:4;a string:s:five, special chars %C%S;a byte array:B:YWJj;", test2);
        }