public void TryGetField_NullKey_Throws() { ViewTemplate viewTemplate = PopulateViewTemplate(); Field field; Assert.Throws <ArgumentNullException>(() => viewTemplate.TryGetField(null, out field)); }
public void TryGetField_DoesNotHaveFieldDefinition_False() { ViewTemplate viewTemplate = PopulateViewTemplate(); Field field; Assert.IsFalse(viewTemplate.TryGetField("none", out field)); }
public void TryGetField_HasFieldDefinition_True() { ViewTemplate viewTemplate = PopulateViewTemplate(); Field field; Assert.IsTrue(viewTemplate.TryGetField("field2", out field)); Assert.IsNotNull(field); Assert.AreEqual("field2", field.FieldName); }