public void GetFieldValuesByType_Null_ExceptionThrown()
 {
     List<double> dummy;
     ScientificDataFormViewModel form = new ScientificDataFormViewModel();
     form.AddField(new TestFormField());
     dummy = form.GetFieldValuesByType(null);
 }
 public void GetFieldValueByID_Null_ExceptionThrown()
 {
     object dummy;
     ScientificDataFormViewModel form = new ScientificDataFormViewModel();
     form.AddField(new TestFormField());
     dummy = form.GetFieldValueByID(null);
 }
 public void GetFieldValueByID_InvalidID_ZeroReturned()
 {
     TestFormField dummy = new TestFormField("Item1", "(label)", "(tooltip)");
     ScientificDataFormViewModel form = new ScientificDataFormViewModel();
     form.AddField(dummy);
     Assert.AreEqual(0.0, form.GetFieldValueByID("Item2"));
 }
 public void GetFieldValuesByType_InvalidType_EmptyListReturned()
 {
     List<double> dummy;
     ScientificDataFormViewModel form = new ScientificDataFormViewModel();
     form.AddField(new TestFormField());
     form.AddField(new TestFormField());
     dummy = form.GetFieldValuesByType(typeof(string));
     Assert.AreEqual(0, dummy.Count);
 }
 public void GetFieldValuesByType_ValidType_ListOfObjectsReturned()
 {
     List<double> dummy;
     ScientificDataFormViewModel form = new ScientificDataFormViewModel();
     form.AddField(new TestFormField());
     form.AddField(new TestFormField());
     form.AddField(new ExtraTestFormField());
     dummy = form.GetFieldValuesByType(typeof(TestFormField));
     Assert.AreEqual(2, dummy.Count);
 }