public void GetFieldObjectByID_ValidID_ObjectReturned()
 {
     TestFormField dummy = new TestFormField("Item1", "(label)", "(tooltip)");
     FormViewModel form = new FormViewModel();
     form.AddField(dummy);
     Assert.AreEqual(dummy, form.GetFieldObjectByID("Item1"));
 }
 public void GetFieldObjectByID_Null_ExceptionThrown()
 {
     object dummy;
     FormViewModel form = new FormViewModel();
     form.AddField(new TestFormField());
     dummy = form.GetFieldObjectByID(null);
 }
 public void GetFieldObjectByID_ValidID_ContentIsNotNull()
 {
     TestFormField dummy = new TestFormField("Item1", "(label)", "(tooltip)");
     FormViewModel form = new FormViewModel();
     form.AddField(dummy);
     Assert.IsNotNull(form.GetFieldObjectByID("Item1"));
 }
 public void GetFieldObjectByID_InvalidID_NullReturned()
 {
     TestFormField dummy = new TestFormField("Item1", "(label)", "(tooltip)");
     FormViewModel form = new FormViewModel();
     form.AddField(dummy);
     Assert.IsNull(form.GetFieldObjectByID("Item2"));
 }