TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sangeetha k
NA
207
51.3k
How to write nunit testing for this method in mvc
Jul 3 2018 8:05 AM
# The controller method
public ActionResult TermsandConditionsDeclineValidation(string AccountName)
{
try
{
string strLoanNumber = repository.GetLoanNumber(Session["access_token"].ToString());
int LoanID = repository.GetLoanId(TUtil.CheckString(strLoanNumber, string.Empty), Session["AccountName"].ToString());
int? IsTcAccepted = repository.TermsandConditionsDeclineValidation(TUtil.CheckInt(LoanID, 0));
if (IsTcAccepted == 0 || IsTcAccepted == null)
{
return RedirectToAction("EndSessionPage");
}
else
{
return RedirectToAction("GetClients");
}
}
catch (Exception ex)
{
Log.WriteError(TUtil.GetMethodExceptionContext(AccountName), ex);
return View();
}
}
Reply
Answers (
1
)
Check queue is already exist or not in RabbitMQ?
How to customize a error message in sitecore 9 forms submit