public void TestLocalDec() { TestCase testCase = TestCase.GetLocalVariableDecClass(); var stmt = Helpers.GetFirstNodeOfType <LocalDeclarationStatementSyntax>(testCase.Code); var coll = new StatementInfoCollector(); var info = coll.Collect(stmt); Assert.IsTrue(info.IsLocalVarDeclaration); Assert.IsTrue(info.LocalVarNames.Contains("localVar1")); }
public void TestIncrementChanger() { TestCase testCase = TestCase.GetLocalVarIncrementor(); var stmt = Helpers.GetFirstNodeOfType <ExpressionStatementSyntax>(testCase.Code); var coll = new StatementInfoCollector(); var info = coll.Collect(stmt); Assert.IsFalse(info.IsLocalVarDeclaration); Assert.IsTrue(info.IsLocalVarStateChanger); Assert.IsTrue(info.LocalVarNames.Contains("localVar1")); }