public void SaveLoad() { var file = new FileEmu(); var filename = "a.xml"; { var settei = new Settei(); settei.FileBase = file; settei.FileName = filename; settei.変更されたら保存 = true; settei.Set("aaa", 10); } { var settei = new Settei(filename, file); Assert.AreEqual(10, settei.Get<int>("aaa")); } }
public void Test1() { var settei = new Settei(); var file = new FileEmu(); settei.FileBase = file; settei.FileName = "aaa.xml"; settei.Set("aaa", 10); Assert.AreEqual(10, settei.Get<int>("aaa")); }
public void オブジェクトのセーブ() { var settei = new Settei(); var file = new FileEmu(); settei.FileBase = file; settei.FileName = "aaa.xml"; var obj = new Test4648(); obj.Value = 11; settei.Set("aaa", obj); Assert.AreEqual(11, (settei.Get<Test4648>("aaa")).Value); }
public void 存在しないキー() { var settei = new Settei(); var file = new FileEmu(); settei.FileBase = file; settei.FileName = "aaa.xml"; settei.Get<int>("aaa"); }
public void XMLを取得() { var settei = new Settei(); var file = new FileEmu(); settei.FileBase = file; settei.FileName = "aaa.xml"; settei.Set("aaa", 10); settei.Set("bbb", 20); string xml = settei.GetXml(); Assert.IsTrue(_xml_sample == xml); }