MT#7679 fix MockSR. default behaviour of sr.xavp.get is get all values.

mr3.4.1
Victor Seva 11 years ago
parent e607914109
commit 16cc950d5c

@ -491,6 +491,7 @@ xavpMock = {
end
function t.get(xavp_name, index, mode)
if not mode then mode = 0 end
xavp = t._get_xavp(xavp_name, index, mode)
return xavp
end

@ -375,7 +375,7 @@ TestNGCP = {} --class
end
function TestNGCP:test_tostring()
assertEquals(tostring(self.ngcp), 'caller_contract_prefs:{dummy="caller"}\ncallee_contract_prefs:{dummy="callee"}\ncaller_peer_prefs:{dummy="caller"}\ncallee_peer_prefs:{dummy="callee"}\ncaller_dom_prefs:{dummy="caller"}\ncallee_dom_prefs:{dummy="callee"}\ncaller_usr_prefs:{dummy="caller"}\ncallee_usr_prefs:{dummy="callee"}\ncaller_real_prefs:{dummy="caller"}\ncallee_real_prefs:{dummy="callee"}\n')
assertEquals(tostring(self.ngcp), 'caller_contract_prefs:{dummy={"caller"}}\ncallee_contract_prefs:{dummy={"callee"}}\ncaller_peer_prefs:{dummy={"caller"}}\ncallee_peer_prefs:{dummy={"callee"}}\ncaller_dom_prefs:{dummy={"caller"}}\ncallee_dom_prefs:{dummy={"callee"}}\ncaller_usr_prefs:{dummy={"caller"}}\ncallee_usr_prefs:{dummy={"callee"}}\ncaller_real_prefs:{dummy={"caller"}}\ncallee_real_prefs:{dummy={"callee"}}\n')
end
-- class TestNGCP
--EOF

@ -194,7 +194,7 @@ TestNGCPDomainPrefs = {} --class
local caller_xavp = NGCPDomainPrefs:xavp('caller')
caller_xavp("other",1)
caller_xavp("otherfoo","foo")
assertEquals(tostring(self.d), 'caller_dom_prefs:{other=1,otherfoo="foo",dummy="caller"}\ncallee_dom_prefs:{dummy="callee",testid=1,foo="foo"}\n')
assertEquals(tostring(self.d), 'caller_dom_prefs:{other={1},otherfoo={"foo"},dummy={"caller"}}\ncallee_dom_prefs:{dummy={"callee"},testid={1},foo={"foo"}}\n')
end
-- class TestNGCPDomainPrefs
--EOF

@ -209,7 +209,7 @@ TestNGCPPeerPrefs = {} --class
local caller_xavp = NGCPPeerPrefs:xavp('caller')
caller_xavp("other",1)
caller_xavp("otherfoo","foo")
assertEquals(tostring(self.d), 'caller_peer_prefs:{other=1,otherfoo="foo",dummy="caller"}\ncallee_peer_prefs:{dummy="callee",testid=1,foo="foo"}\n')
assertEquals(tostring(self.d), 'caller_peer_prefs:{other={1},otherfoo={"foo"},dummy={"caller"}}\ncallee_peer_prefs:{dummy={"callee"},testid={1},foo={"foo"}}\n')
end
-- class TestNGCPPeerPrefs
--EOF

@ -260,7 +260,7 @@ TestNGCPRealPrefs = {} --class
callee_xavp("foo","foo")
caller_xavp("other",1)
caller_xavp("otherfoo","foo")
assertEquals(tostring(self.real),'caller_real_prefs:{other=1,otherfoo="foo",dummy="caller"}\ncallee_real_prefs:{dummy="callee",testid=1,foo="foo"}\n')
assertEquals(tostring(self.real),'caller_real_prefs:{other={1},otherfoo={"foo"},dummy={"caller"}}\ncallee_real_prefs:{dummy={"callee"},testid={1},foo={"foo"}}\n')
end
-- class TestNGCPRealPrefs
--EOF

@ -213,7 +213,7 @@ TestNGCPUserPrefs = {} --class
local caller_xavp = NGCPUserPrefs:xavp('caller')
caller_xavp("other",1)
caller_xavp("otherfoo","foo")
assertEquals(tostring(self.d),'caller_usr_prefs:{other=1,otherfoo="foo",dummy="caller"}\ncallee_usr_prefs:{dummy="callee",testid=1,foo="foo"}\n')
assertEquals(tostring(self.d), 'caller_usr_prefs:{other={1},otherfoo={"foo"},dummy={"caller"}}\ncallee_usr_prefs:{dummy={"callee"},testid={1},foo={"foo"}}\n')
end
-- class TestNGCPUserPrefs
--EOF

@ -135,7 +135,7 @@ TestNGCPXAvp = {} --class
function TestNGCPXAvp:test_tostring()
local xavp = NGCPXAvp:new("caller", "peer", {})
assertEquals(tostring(xavp), '{dummy="caller"}')
assertEquals(tostring(xavp), '{dummy={"caller"}}')
end
function TestNGCPXAvp:test_keys()

Loading…
Cancel
Save