Author: ygrego Date: 2015-05-19 09:08:00 +0000 (Tue, 19 May 2015) New Revision: 1385 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1385 Log: Addition of method "renderResultIfTrue" and modification of method "beforeTest". Modified: oipf/js/test/ParentalControlManagerTest.js Modified: oipf/js/test/ParentalControlManagerTest.js =================================================================== --- oipf/js/test/ParentalControlManagerTest.js 2015-05-19 08:55:19 UTC (rev 1384) +++ oipf/js/test/ParentalControlManagerTest.js 2015-05-19 09:08:00 UTC (rev 1385) @@ -14,15 +14,27 @@ this.PIN = "1234"; }, - beforeTest: function() { + beforeTest: function(resolve, reject) { this.parentalControlManagerObject = oipfObjectFactory.createParentalControlManagerObject(); + + this.renderResultIfTrue = + this.renderResultIfTrue.bind(this, resolve, reject); + }, afterTest: function() { }, + renderResultIfTrue: function(resolve, reject, condition) { + if (condition) { + resolve(); + } else { + reject(); + } + }, + testVerifyParentalControlPIN10Times: function(resolve, reject) { for(var i = 0, li = 10; i < li; i++) { var result = this.parentalControlManagerObject
participants (1)
-
ygregoï¼ users.nuiton.org