示例#1
0
		public OrderedCharacterSet(string text, OrderedRules rules, string name = null) {
			Name = name;
			string uniqueText = text.MakeUnique();
			if (rules.NoSpaces)
				Characters = uniqueText;
			else
				Characters = " " + uniqueText;
			Text = text;
			Rules = rules;
			ParallelAbility = rules.ParallelAbility;
			if (uniqueText.Contains(" "))
				throw new ArgumentException($"{nameof(text)} cannot contain spaces!");
		}
        public void ResolveParallelTree(IDictionary <string, SortedSet <string> > dependencyTree, IDictionary <string, int> expected)
        {
            IDictionary <string, int> actual = ParallelAbility.ResolveParallelTree(dependencyTree);

            Assert.That(actual, Is.EquivalentTo(expected));
        }