public void GetPropertyBoolTestUsingInt0() { var p = new CMSProperties(_database); p.SaveProperty(TestPropName, 0); var b = p.GetProperty(TestPropName, true); Assert.AreEqual(b, false); }
public void SavePropertyDateTimeTest() { var p = new CMSProperties(_database); var d1 = DateTime.UtcNow; p.SaveProperty(TestPropName, d1); var d2 = p.GetProperty(TestPropName, DateTime.MinValue); Assert.AreEqual(d1, d2); }
public void GetPropertyStringDefaultTest() { var p = new CMSProperties(_database); p.DeleteProperty(TestPropName); var testValue = Guid.NewGuid().ToString(); var s = p.GetProperty(TestPropName, testValue); Assert.AreEqual(s, testValue); }
public void SavePropertyTest() { var p = new CMSProperties(_database); var testValue = Guid.NewGuid().ToString(); p.SaveProperty(TestPropName, testValue); var s = p.GetProperty(TestPropName, ""); Assert.AreEqual(s, testValue); }
public void GetPropertyIntTest() { var p = new CMSProperties(_database); Random rnd = new Random(); var i1 = rnd.Next(1, 999); p.SaveProperty(TestPropName, i1); var i2 = p.GetProperty(TestPropName, 0); Assert.AreEqual(i1, i2); }