I'm new to unit testing and i need to test a insert command in my code. Can anyone please let me know how to do it.. Following is the method i want to test.
public void InsertData()
{
Connect();
query = "Insert into Person values ('"+ name +"','"+ address +"','"+
phn +"')";
cmd = new SqlCommand(query, Conn);
cmd.ExecuteNonQuery();
DisConnect();
}
Aucun commentaire:
Enregistrer un commentaire