public void GetFieldObjectsByType_Null_ExceptionThrown() { List<IFormField> dummy; FormViewModel form = new FormViewModel(); form.AddField(new TestFormField()); dummy = form.GetFieldObjectsByType(null); }
public void GetFieldObjectsByType_ValidType_ListOfObjectsReturned() { List<IFormField> dummy; FormViewModel form = new FormViewModel(); form.AddField(new TestFormField()); form.AddField(new TestFormField()); dummy = form.GetFieldObjectsByType(typeof(TestFormField)); Assert.AreEqual(2, dummy.Count); }
public void GetFieldObjectsByType_InvalidType_EmptyListReturned() { List<IFormField> dummy; FormViewModel form = new FormViewModel(); form.AddField(new TestFormField()); form.AddField(new TestFormField()); dummy = form.GetFieldObjectsByType(typeof(FormViewModel)); Assert.AreEqual(0, dummy.Count); }