Author: ygrego Date: 2015-04-01 13:53:09 +0000 (Wed, 01 Apr 2015) New Revision: 1023 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1023 Log: Reviewing of transitions states in this test method. Modified: oipf/js/test/VideoBroadcastTest.js Modified: oipf/js/test/VideoBroadcastTest.js =================================================================== --- oipf/js/test/VideoBroadcastTest.js 2015-04-01 13:49:05 UTC (rev 1022) +++ oipf/js/test/VideoBroadcastTest.js 2015-04-01 13:53:09 UTC (rev 1023) @@ -773,21 +773,19 @@ testSetChannelInStoppedWithNull: function(resolve, reject) { var self = this; - this.addTransition(this.PRESENTING, this.CONNECTING); - this.addTransition(this.CONNECTING, this.PRESENTING); - - this.vidBroadObj.onChannelChangeSucceeded = function(channel) { + this.addTransition(this.UNREALIZED, this.CONNECTING); - if (self.assertNotNull(channel) && self.assertEquals(self.vidBroadObj.playState, self.PRESENTING)) { - logTest("State: Successful"); - resolve("Success"); - } else { - logTest("State: Failure"); - reject("Failure : The channel is null for a unknown reason or wrong play state."); - } - }; + this.addTransition(this.CONNECTING, this.PRESENTING, function() { + self.vidBroadObj.stop(); + }); - this.vidBroadObj.setChannel(null); + this.addTransition(this.PRESENTING, this.STOPPED, function() { + self.vidBroadObj.setChannel(null); + }); + + this.addTransition(this.STOPPED, this.UNREALIZED, resolve); + + this.vidBroadObj.bindToCurrentChannel(); } }); \ No newline at end of file
participants (1)
-
ygregoï¼ users.nuiton.org