protected override void SetValue(string propertyName, object val) { if (fc == null) fc = new FCTempFile(this.Name); switch (propertyName) { case "State": this.State = Convert.ToBoolean(val); break; default: throw new Exception(string.Format("The client is not allowed to modify {0}; to the client, {0} is a read-only object", propertyName)); } }
internal void SetTempValue() { if (fc == null) fc = new FCTempFile(this.Name); var nodes = fc.GetNodes(); if (nodes == null) return; foreach (XmlNode n in nodes) { switch (n.Attributes["key"].Value.ToLower()) { case "value": this.State = Convert.ToBoolean(n.Attributes["value"].Value); break; } } }
public void GetHistoryTest() { string filename = "centrallogging"; // TODO: Initialize to an appropriate value FCTempFile target = new FCTempFile(filename); // TODO: Initialize to an appropriate value string actual; actual = target.GetHistory(); }
public void FCTempFileConstructorTest() { string filename = "centrallogging"; // TODO: Initialize to an appropriate value FCTempFile target = new FCTempFile(filename); Assert.IsNotNull(target); }
public void WriteTest() { string filename = "centrallogging"; // TODO: Initialize to an appropriate value FCTempFile target = new FCTempFile(filename); // TODO: Initialize to an appropriate value string key = "test"; // TODO: Initialize to an appropriate value object oldVal = "old"; // TODO: Initialize to an appropriate value object newVal = "new"; // TODO: Initialize to an appropriate value target.Write(key, oldVal, newVal); PrivateObject param0 = new PrivateObject("centrallogging"); FCTempFile_Accessor t = new FCTempFile_Accessor(param0); Assert.IsTrue(true); }