Author: ygrego Date: 2015-04-08 09:25:14 +0000 (Wed, 08 Apr 2015) New Revision: 1108 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1108 Log: Addition of new tests about "createSearch". Modified: oipf/js/test/SearchManagerTest.js Modified: oipf/js/test/SearchManagerTest.js =================================================================== --- oipf/js/test/SearchManagerTest.js 2015-04-08 09:16:38 UTC (rev 1107) +++ oipf/js/test/SearchManagerTest.js 2015-04-08 09:25:14 UTC (rev 1108) @@ -7,6 +7,8 @@ SCHEDULED_CONTENT: 1, + CONTENT_ON_DEMAND: 2, + UNREALIZED: 0, CONNECTING: 1, @@ -152,5 +154,40 @@ } else { reject(); } + }, + + testCreateSearchForContentOnDemand: function(resolve, reject) { + this.metadataSearch = this.searchManagerObj. + createSearch(this.CONTENT_ON_DEMAND); + + if (this.assertNotNull(this.metadataSearch) && + this.assertEquals(this.metadataSearch.searchTarget, + this.CONTENT_ON_DEMAND)) { + resolve(); + } else { + reject(); + } + }, + + testCreateSearchWithNull: function(resolve, reject) { + this.metadataSearch = this.searchManagerObj. + createSearch(null); + + if (!this.assertNotNull(this.metadataSearch)) { + resolve(); + } else { + reject(); + } + }, + + testCreateSearchWithString: function(resolve, reject) { + this.metadataSearch = this.searchManagerObj. + createSearch("1"); + + if (!this.assertNotNull(this.metadataSearch)) { + resolve(); + } else { + reject(); + } } }); \ No newline at end of file
participants (1)
-
ygregoï¼ users.nuiton.org