高效的JavaScript代码单元测试方法(5)
发表于:2013-01-11来源:web开发社区作者:Hazem Saleh点击数:
标签:JavaScript
04 /*:DOC += FORM action=tabletrtdUsername/tdtd 05 input type=text id=username//tdtdspan id=usernameMessage 06 /span/td/trtrtdPassword/tdtd 07 input type=password id=password//tdtdspan id=passwordMess
11 |
ApplicationUtilTest.prototype.testValidateLoginFormBothEmpty = function () { |
12 |
var applicationUtil = new appnamespace.ApplicationUtil(); |
15 |
document.getElementById( "username" ).value = "" ; |
16 |
document.getElementById( "password" ).value = "" ; |
17 |
applicationUtil.validateLoginForm (); |
18 |
assertEquals ( "Username is not validated correctly!" , "This field is required" , |
原文转自:http://www.ltesting.net