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 end
function t.get(xavp_name, index, mode) function t.get(xavp_name, index, mode)
if not mode then mode = 0 end
xavp = t._get_xavp(xavp_name, index, mode) xavp = t._get_xavp(xavp_name, index, mode)
return xavp return xavp
end end

@ -375,7 +375,7 @@ TestNGCP = {} --class
end end
function TestNGCP:test_tostring() 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 end
-- class TestNGCP -- class TestNGCP
--EOF --EOF

@ -194,7 +194,7 @@ TestNGCPDomainPrefs = {} --class
local caller_xavp = NGCPDomainPrefs:xavp('caller') local caller_xavp = NGCPDomainPrefs:xavp('caller')
caller_xavp("other",1) caller_xavp("other",1)
caller_xavp("otherfoo","foo") 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 end
-- class TestNGCPDomainPrefs -- class TestNGCPDomainPrefs
--EOF --EOF

@ -209,7 +209,7 @@ TestNGCPPeerPrefs = {} --class
local caller_xavp = NGCPPeerPrefs:xavp('caller') local caller_xavp = NGCPPeerPrefs:xavp('caller')
caller_xavp("other",1) caller_xavp("other",1)
caller_xavp("otherfoo","foo") 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 end
-- class TestNGCPPeerPrefs -- class TestNGCPPeerPrefs
--EOF --EOF

@ -260,7 +260,7 @@ TestNGCPRealPrefs = {} --class
callee_xavp("foo","foo") callee_xavp("foo","foo")
caller_xavp("other",1) caller_xavp("other",1)
caller_xavp("otherfoo","foo") 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 end
-- class TestNGCPRealPrefs -- class TestNGCPRealPrefs
--EOF --EOF

@ -213,7 +213,7 @@ TestNGCPUserPrefs = {} --class
local caller_xavp = NGCPUserPrefs:xavp('caller') local caller_xavp = NGCPUserPrefs:xavp('caller')
caller_xavp("other",1) caller_xavp("other",1)
caller_xavp("otherfoo","foo") 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 end
-- class TestNGCPUserPrefs -- class TestNGCPUserPrefs
--EOF --EOF

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

Loading…
Cancel
Save