如何测试返回值为空?急
我用NUnit测试,这个方法返回值为空,
请问高手一般这种问题是怎么测试的,急...
public void Print(bool withSetDialog)
{
string templateId = PushDataToSession();
if (error != null)
{
((Page)HttpContext.Current.Handler).ClientScript.RegisterStartupScript(typeof(object), "dd", getErrorCallBackScript(true));
return;
}
string callBackscript = PrintHelper.GetCallBackPrintScriptByIframe(withSetDialog ? PrintAction.PrintWithDialog : PrintAction.Print, templateId, true);
((Page)HttpContext.Current.Handler).ClientScript.RegisterStartupScript(typeof(object), "dd", callBackscript);
}