コード例 #1
0
ファイル: MabiDictionary.cs プロジェクト: tkiapril/aura
		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"));
		}
コード例 #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"));
        }