예제 #1
0
        public void GetExistsKeyValueTest()
        {
            UserFields uf = new UserFields();

            uf["test"] = "hoge";
            Assert.AreEqual("hoge", uf["test"]);
            Assert.AreEqual("hoge", uf.GetString("test", null));
        }
예제 #2
0
        public void GetNotExistsKeyValueTest()
        {
            UserFields uf = new UserFields();

            uf["test"] = "hoge";
            try
            {
                string value = (string)uf["test2"];
                Assert.Fail("Should throw Exception");
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(IllegalKiiBaseObjectFormatException), e.GetType());
            }
            Assert.IsNull(uf.GetString("test2", null));
        }