Example #1
0
        public void XmlStorageSaveAndLoadB()
        {
            XmlStorageManager.Save("TestD", new MockData());

            var d = XmlStorageManager.Load <MockData>("TestD");

            Assert.AreEqual(default(string), d.Name);
            Assert.AreEqual(default(int), d.Age);
            Assert.AreEqual(default(string), d.Email);
            Assert.AreEqual(default(string), d.Website);
        }
Example #2
0
        public void XmlStorageSaveAndLoadA()
        {
            XmlStorageManager.Save("TestC", new MockData()
            {
                Name    = "Bob",
                Age     = 25,
                Email   = "*****@*****.**",
                Website = "http://doubleyouww.com"
            });

            var d = XmlStorageManager.Load <MockData>("TestC");

            Assert.AreEqual("Bob", d.Name);
            Assert.AreEqual(25, d.Age);
            Assert.AreEqual("*****@*****.**", d.Email);
            Assert.AreEqual("http://doubleyouww.com", d.Website);
        }
Example #3
0
        public void XmlStorageLoadA()
        {
            var d = XmlStorageManager.Load <MockData>("Nonexistant-Name");

            Assert.IsNull(d);
        }
Example #4
0
 public void XmlStorageLoadWithoutInit()
 {
     XmlStorageManager.Load <MockData>("A");
 }
Example #5
0
 public void XmlStorageLoadFailureB()
 {
     XmlStorageManager.Load <MockData>("<>*");
 }
Example #6
0
 public void XmlStorageLoadFailureA()
 {
     XmlStorageManager.Load <MockData>(null);
 }