Ejemplo n.º 1
0
		public void Deserialize()
		{
			var test = new MabiDictionary();
			test.Parse("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;");

			Assert.Equal(true, test.GetBool("a bool"));
			Assert.Equal(1, test.GetByte("a byte"));
			Assert.Equal(2, test.GetShort("a short"));
			Assert.Equal(3, test.GetInt("an int"));
			Assert.Equal(4, test.GetFloat("a float"));
			Assert.Equal("five, special chars :;", test.GetString("a string"));
		}
Ejemplo n.º 2
0
        public void Deserialize()
        {
            var test = new MabiDictionary();

            test.Parse("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;");

            Assert.Equal(true, test.GetBool("a bool"));
            Assert.Equal(1, test.GetByte("a byte"));
            Assert.Equal(2, test.GetShort("a short"));
            Assert.Equal(3, test.GetInt("an int"));
            Assert.Equal(4, test.GetFloat("a float"));
            Assert.Equal("five, special chars :;", test.GetString("a string"));
        }