Example #1
0
        public void TestNeedValidation05()
        {
            string xml = @"
        <collection>
           <validator location='海淀分馆' >
               <patron>
                   <CMIS />
                   <range value='P000001-P999999' />
               </patron>
               <entity>
                   <range value='0000001-9999999' transform='barcode+&quot;tail&quot;'></range>
               </entity>
               <transform>
                    barcode+'tail'
               </transform>
           </validator>
        </collection>";

            BarcodeValidator validator = new BarcodeValidator(xml);

            {
                var result = validator.NeedValidate("海淀分馆");
                Assert.AreEqual(true, result);
            }
        }
Example #2
0
        public void TestNeedValidation01()
        {
            string xml = @"
        <collection>
           <validator location='海淀分馆' >
               <patron>
                   <CMIS />
                   <range value='P000001-P999999' />
               </patron>
               <entity>
                   <range value='0000001-9999999'></range>
               </entity>
           </validator>
        </collection>";

            BarcodeValidator validator = new BarcodeValidator(xml);

            {
                var result = validator.NeedValidate("西城分馆");
                Assert.AreEqual(false, result);
            }
        }