예제 #1
0
        public void TryGetField_NullKey_Throws()
        {
            ViewTemplate viewTemplate = PopulateViewTemplate();
            Field        field;

            Assert.Throws <ArgumentNullException>(() => viewTemplate.TryGetField(null, out field));
        }
예제 #2
0
        public void TryGetField_DoesNotHaveFieldDefinition_False()
        {
            ViewTemplate viewTemplate = PopulateViewTemplate();
            Field        field;

            Assert.IsFalse(viewTemplate.TryGetField("none", out field));
        }
예제 #3
0
        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);
        }