diff --git a/ngcp.lua b/ngcp.lua index 5b7df01..502ca92 100644 --- a/ngcp.lua +++ b/ngcp.lua @@ -35,10 +35,10 @@ NGCP_MT = { __index = NGCP } function NGCP:new() local t = {} - t.config = NGCPConfig() + t.config = NGCPConfig:new() t.preference = { - domain = NGCPPreference('domain'), - peer = NGCPPreference('peer'), + domain = NGCPPreference:new('domain'), + peer = NGCPPreference:new('peer'), } setmetatable( t, NGCP_MT ) return t diff --git a/tests/ngcp.lua b/tests/ngcp.lua index bf72b82..0f917c2 100644 --- a/tests/ngcp.lua +++ b/tests/ngcp.lua @@ -5,19 +5,18 @@ require 'ngcp' TestNGCP = {} --class function TestNGCP:setUp() - self.ngcp = NGCP() + self.ngcp = NGCP:new() end function TestNGCP:test_config() - assertEquals( self.ngcp.preference.domain.name , 'name' ) + assertEquals( self.ngcp.preference.domain.name , 'domain' ) assertEquals( self.ngcp.preference.peer.name , 'peer' ) end -- class TestNGCP ---- Control test output: lu = LuaUnit --- lu:setOutputType( "NIL" ) lu:setOutputType( "TAP" ) -lu:setVerbosity( 0 ) +lu:setVerbosity( 1 ) lu:run() --EOF \ No newline at end of file