예제 #1
0
        public void RecordFieldUtility_GetSubField_3()
        {
            RecordField field = _GetField();

            SubField[] subFields = RecordFieldUtility.GetSubField(field, 'a');
            Assert.AreEqual(1, subFields.Length);

            subFields = RecordFieldUtility.GetSubField(field, 'b');
            Assert.AreEqual(1, subFields.Length);

            subFields = RecordFieldUtility.GetSubField(field, 'x');
            Assert.AreEqual(0, subFields.Length);
        }
예제 #2
0
        public void RecordFieldUtility_GetSubField_2()
        {
            IEnumerable <RecordField> enumeration = _GetFieldEnumeration();

            SubField[] subFields = RecordFieldUtility.GetSubField(enumeration, 'a', 'b');
            Assert.AreEqual(2, subFields.Length);

            enumeration = _GetFieldEnumeration();
            subFields   = RecordFieldUtility.GetSubField(enumeration, 'b', 'z');
            Assert.AreEqual(1, subFields.Length);

            enumeration = _GetFieldEnumeration();
            subFields   = RecordFieldUtility.GetSubField(enumeration, 'x', 'z');
            Assert.AreEqual(0, subFields.Length);
        }