public void VerificaAConexao() { SqlServerConn.configuraStrConnection (@"C:\Users\sebastiao.martins\Documents\Visual Studio 2008\Projects\Coletor\z_Auxiliares", "strConn.txt"); System.Data.SqlClient.SqlConnection conn = SqlServerConn.openConn(); Assert.AreEqual(ConnectionState.Open, conn.State); Console.WriteLine("Opened"); conn.Close(); Assert.AreEqual(ConnectionState.Closed, conn.State); Console.WriteLine("Closed"); }
public void starConnection() { SqlServerConn.configuraStrConnection (@"C:\Users\sebastiao.martins\Documents\Visual Studio 2008\Projects\Coletor\z_Auxiliares", "strConn.txt"); this.Conn = SqlServerConn.openConn(); }