public ProgramTests() { _mockArgParser = new MockArgumentParser(); _mockRunner = new MockRunner(); _mockSqlResult = new MockSqlResult(); ((MockSqlResult)_mockSqlResult).ExpectedTextOutput = "formatted text"; _testProgram = new Program(_mockArgParser, _mockRunner); }
private ISqlResult GetSqlResult() { if (sqlResult == null) { string sql = String.Format("SELECT * FROM {0} WHERE {1}", TableName, GetWhereColumnValueString("=", "AND")); var rows = SqlProvider.ExecuteQuery(sql, SelectOptions.Single); if (rows.Count > 0) { sqlResult = rows[0]; } } return(sqlResult); }
private ISqlResult GetSqlResult() { if (sqlResult == null) { string sql = String.Format("SELECT * FROM {0} WHERE {1}", TableName, GetWhereColumnValueString("=", "AND")); var rows = SqlProvider.ExecuteQuery(sql, SelectOptions.Single); if (rows.Count > 0) sqlResult = rows[0]; } return sqlResult; }