示例#1
0
        public void PerformanceTest()
        {
            RegexReplaceTransform transform = new RegexReplaceTransform();

            transform.FindPattern    = @"[^a-zA-Z\-]";
            transform.ReplacePattern = string.Empty;

            UnitTestControl.PerformanceTest(() =>
            {
                Assert.AreEqual("Ryan", transform.TransformValue("Ry^*an").First());
            }, 250000);
        }
示例#2
0
        private void ExecuteTestSubString(RegexReplaceTransform transform, string sourceValue, string expectedValue)
        {
            string outValue = transform.TransformValue(sourceValue).FirstOrDefault() as string;

            Assert.AreEqual(expectedValue, outValue);
        }