예제 #1
0
        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));
            }
        }
예제 #2
0
 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;
         }
     }
 }
예제 #3
0
        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();

        }
예제 #4
0
 public void FCTempFileConstructorTest()
 {
     string filename = "centrallogging"; // TODO: Initialize to an appropriate value
     FCTempFile target = new FCTempFile(filename);
     Assert.IsNotNull(target);
 }
예제 #5
0
 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);
 }