-
Notifications
You must be signed in to change notification settings - Fork 1
SQL return params
DUONG Phu-Hiep edited this page Apr 7, 2016
·
1 revision
public void Login_fail_password_incorrect()
{
//ElapsedTimeWatcher is used to log the benchmark on execution time: https://github.com/duongphuhiep/ToolsPack.Net/wiki#elapsedtimewatcher
using (var etw = ElapsedTimeWatcher.Create(Log, "LoginFail"))
{
var returnStatus = -2;
using (var db = new AdoHelper(ConnectionString))
{
etw.Debug("Connect to Database OK");
var returnStatusParam = new SqlParameter("@returnStatus", SqlDbType.Int) { Direction = ParameterDirection.ReturnValue };
db.ExecNonQueryProc("verify_login_pass_backoffice",
"@login", "society",
"@mdp", getMD5("fauxpassword"), 256, //256 is the size of the parameter
"@is_marque_blanche", false,
"@func_type", 110,
returnStatusParam
);
etw.Debug("Exec sproc OK");
returnStatus = Convert.ToInt32(returnStatusParam.Value);
}
Assert.AreEqual(1, returnStatus);
}
}