コード例 #1
0
        public void TestProcFormAdd()
        {
            int ProcessID = 77777777;

            FieldResponse someField = new FieldResponse();
            someField.Field = "Non Rep";
            someField.Value = "The Value";

            ProcFormResponse FormData = new ProcFormResponse();
            FormData.Fields.Add(someField);
            Client client = this.getApiClient();
            ProcFormResponseWrapper response = client.ProcFormAdd(ProcessID, FormData);

            Assert.AreEqual(response.ProcessID, ProcessID);
            Assert.AreEqual(response.Form.Fields.Count, 1);
            FieldResponse SavedField = response.Form.Fields[0];
            Assert.AreEqual(someField, SavedField);
        }
コード例 #2
0
 public object Clone()
 {
     ProcFormResponse clone = new ProcFormResponse();
     clone.FormID = this.FormID;
     clone.Fields = this.CloneCollection<FieldResponse>(this.Fields);
     clone.ProcessID = this.ProcessID;
     clone.ProcessName = (string)this.ProcessName.Clone();
     clone.Number = (string)this.Number.Clone();
     clone.Owner = (string)this.Owner.Clone();
     clone.Participants = this.CloneCollection<ParticipantResponse>(this.Participants);
     clone.Status = (string)this.Status.Clone();
     clone.ApprovalResult = (string)this.ApprovalResult.Clone();
     clone.Started = this.Started;
     clone.Modified = this.Modified;
     clone.Values = this.CloneCollection<string>(this.Values);
     clone.Sets = this.CloneCollection<ProcFormSet>(this.Sets);
     clone.Notes = this.CloneCollection<NoteResponse>(this.Notes);
     clone.NotesForStaff = this.CloneCollection<NoteResponse>(this.NotesForStaff);
     return clone;
 }