public void GetExistsKeyValueTest() { UserFields uf = new UserFields(); uf["test"] = "hoge"; Assert.AreEqual("hoge", uf["test"]); Assert.AreEqual("hoge", uf.GetString("test", null)); }
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)); }