Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestRunner"/> class.
        /// </summary>
        /// <param name="testResources"></param>
        /// <param name="comparer"></param>
        public TestRunner(IEnumerable <TestResource> testResources, IStringComparer comparer = null)
        {
            if (testResources == null)
            {
                throw new ArgumentNullException(nameof(testResources));
            }
            if (testResources.Count() == 0)
            {
                throw new ArgumentException("We need at least one resource to run the test", nameof(testResources));
            }

            this.testResources = testResources;
            this.comparer      = comparer == null ? new NormalStringComparer() : comparer;
        }
Esempio n. 2
0
 public PgnGameMatcher(IStringComparer stringComparer = null, IPgnGameResultComparer pgnGameResultComparer = null)
 {
     _stringComparer        = stringComparer ?? new StringComparer();
     _pgnGameResultComparer = pgnGameResultComparer ?? new PgnGameResultComparer();
 }
 public StraightforwardValueComparer(string targetValue, IStringComparer comparer)
 {
     this.targetValue = targetValue;
     this.comparer    = comparer;
 }
 public StringMatcherService(IStringComparer comparer)
 {
     _comparer = comparer;
 }