Пример #1
0
        public void StripeFileMatches(string filePattern, string fileName, bool expectedResult)
        {
            var doc    = new XElement("stripe", new XAttribute("file", filePattern));
            var config = new StripeConfiguration(doc);
            var stripe = new Stripe(config);

            var result = stripe.ExecuteFor(fileName);

            Assert.AreEqual(expectedResult, result != null);
        }
Пример #2
0
        public void StripeExtractsMatchGroups(string filePattern, string fileName, string groupName, string groupValue)
        {
            var doc    = new XElement("stripe", new XAttribute("file", filePattern));
            var config = new StripeConfiguration(doc);
            var stripe = new Stripe(config);

            var result = stripe.ExecuteFor(fileName);

            Assert.IsNotNull(result);

            var value = result[groupName];

            Assert.AreEqual(groupValue, value);
        }