public void when_send_connectionString_should_connect_and_run_command() { var sqlServerDriver = new SQLServerDriver(_connectionstring); string sqlCommand = "use master;"; Action action = () => sqlServerDriver.ExecuteCommand(sqlCommand); action.Should().NotThrow <Exception>(); }
public void when_run_wrong_command_then_should_run_with_exception() { var sqlConnection = new SqlConnection(_connectionstring); var sqlServerDriver = new SQLServerDriver(sqlConnection); string wrongSqlCommand = "use"; Action action = () => sqlServerDriver.ExecuteCommand(wrongSqlCommand); action.Should().Throw <DatabaseDriverException>(); }