Exemplo n.º 1
0
        public void HasParentFieldOfTypeMethodTest()
        {
            var field = new SourceField(new Connection());
            field.ParentField = new SourceField(new Connection()){DataType = NodeDataType.Boolean, 
                    ParentField = new SourceField(new Connection()){DataType = NodeDataType.GageRR}};

            //Doesn't match
            Assert.IsFalse(field.HasParentFieldOfType(NodeDataType.File));

            //Matches
            Assert.IsTrue(field.HasParentFieldOfType(NodeDataType.GageRR));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Determines weather we can add dependencies for the field specified
 /// </summary>
 /// <param name="field">The field</param>
 private bool CanAddDependencies(SourceField field)
 {
     return !field.HasParentFieldOfType(NodeDataType.GageRR);
 }