public void ParseTest(string input, Type expectedStatementType) { ActivateStatementParser target = new ActivateStatementParser(); var actual = target.Parse(input).First(); Assert.IsInstanceOf(expectedStatementType, actual); }
public void EnsureTokens(string input, string[] expectedTokenValues) { ActivateStatementParser target = new ActivateStatementParser(); IEnumerable <Statement> actual = target.Parse(input); var actualTokenValues = actual.SelectMany(st => st.Tokens()).Select(token => token.Value); CollectionAssert.AreEquivalent(actualTokenValues, actualTokenValues); }