Exemple #1
0
        TwCommandFixtures GetFixtures(string[] tokens, ref int index, ref string error)
        {
            var fixtures = new TwCommandFixtures();

            FixtureClass fixtureClass;
            bool         exclude = false;

            while ((index < tokens.Length) && (fixtureClass = GetFixture(tokens[index], ref error, ref exclude)) != null)
            {
                if (fixtures.Count > 0 && fixtures.Exclude != exclude)
                {
                    error = "Fixtures must be either all included or all excluded: " + BuildTokens(tokens, index);
                    return(null);
                }
                fixtures.Add(fixtureClass);
                fixtures.Exclude = exclude;
                index++;
            }

            return(fixtures);
        }
Exemple #2
0
 bool FixtureExists(TwCommandFixtures fixtures)
 {
     return(fixtures != null && fixtures.Count > 0);
 }
Exemple #3
0
 public TwCommand()
 {
     Fixtures    = new TwCommandFixtures();
     Constraints = new TwCommandConstraints();
 }