Author: ygrego Date: 2015-02-03 16:53:35 +0000 (Tue, 03 Feb 2015) New Revision: 762 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/762 Log: Adding of method 'testCreatingConfigurationObj'. Modified: oipf/js/impl/ConfigurationObject.js oipf/js/test/test.js Modified: oipf/js/impl/ConfigurationObject.js =================================================================== --- oipf/js/impl/ConfigurationObject.js 2015-02-03 16:20:28 UTC (rev 761) +++ oipf/js/impl/ConfigurationObject.js 2015-02-03 16:53:35 UTC (rev 762) @@ -5,15 +5,15 @@ */ var ConfigurationObject = Class.extend({ - /* + /* * Description: * Accesses the configuration object that sets defaults and shows system settings. * * Visibility Type: readonly Configuration */ - configuration: null, + configuration: null, - /* + /* * Description: * Accesses the object representing the platform hardware. * @@ -21,20 +21,18 @@ */ localSystem: null, - init : function(){ }, - /* + /* * Description: * The function that is called when the IP address of a network interface has changed. The specified function - * is called with two arguments (NetworkInterface)item and (String)ipAddress . The ipAddress may have the value undefined if a previously assigned address has been * lost. + * is called with two arguments (NetworkInterface)item and (String)ipAddress. The ipAddress may have the value undefined if a previously assigned address has been * lost. * */ onIpAddressChange: function(item, ipAddress) { } - }); Modified: oipf/js/test/test.js =================================================================== --- oipf/js/test/test.js 2015-02-03 16:20:28 UTC (rev 761) +++ oipf/js/test/test.js 2015-02-03 16:53:35 UTC (rev 762) @@ -27,7 +27,7 @@ currentchannel = new Channel(currentChannelName, currentChannelType); console.assert(currentchannel != null,"The object currentChannel is null."); console.assert(currentchannel.name == currentChannelName, "The current channel name don't match the affected name previously."); - console.assert(currentchannel.channelType == channelConstants[currentChannelType], "The current channel type don't match the affected type previously."); + console.assert(currentchannel.channelType == CHANNEL_CONSTANT[currentChannelType], "The current channel type don't match the affected type previously."); channelConfigObject=oipfObjectFactory.createChannelConfig(); console.assert(channelConfigObject!=null,"The object channelConfig is null."); @@ -37,4 +37,37 @@ console.log("[TEST-RUNNING][Result] Creating of channelConfig oipf object [SUCESSFULL]."); +} + +function testCreatingConfigurationObj(){ + + console.log("[TEST-RUNNING][Info] Creating of configuration oipf object."); + ///////////////////////////////////////////Before test: init//////////////////////////////// + tunerMain = new Tuner(); + tunerTab = [tunerMain]; + + tunerCollection = new TunerCollection(tunerTab); + + configuration = new Configuration(); + + localsystem = new LocalSystem(); + localsystem.tuners=tunerCollection; + + + + ///////////////////////////////////////////Before test: init//////////////////////////////// + + currentchannel = new Channel(currentChannelName, currentChannelType); + console.assert(currentchannel != null,"The object currentChannel is null."); + console.assert(currentchannel.name == currentChannelName, "The current channel name don't match the affected name previously."); + console.assert(currentchannel.channelType == CHANNEL_CONSTANT[currentChannelType], "The current channel type don't match the affected type previously."); + + channelConfigObject=oipfObjectFactory.createChannelConfig(); + console.assert(channelConfigObject!=null,"The object channelConfig is null."); + + channelConfigObject.currentChannel = currentchannel; + console.assert(channelConfigObject.currentChannel == currentchannel, "Unconsistency about the current channel."); + + console.log("[TEST-RUNNING][Result] Creating of channelConfig oipf object [SUCESSFULL]."); + } \ No newline at end of file