summaryrefslogtreecommitdiffstats
path: root/callagent/tests/SIPCallAgentTest.st
diff options
context:
space:
mode:
Diffstat (limited to 'callagent/tests/SIPCallAgentTest.st')
-rw-r--r--callagent/tests/SIPCallAgentTest.st32
1 files changed, 16 insertions, 16 deletions
diff --git a/callagent/tests/SIPCallAgentTest.st b/callagent/tests/SIPCallAgentTest.st
index c1d151a..2d6e88c 100644
--- a/callagent/tests/SIPCallAgentTest.st
+++ b/callagent/tests/SIPCallAgentTest.st
@@ -146,7 +146,7 @@ TestCase subclass: SIPCallAgentTest [
call createCall: 'dummy-sdp'.
self assert: call state equals: SIPCall stateInvite.
self assert: sent size equals: 1.
- msg := SIPParser parse: sent first data.
+ msg := agent parser parse: sent first data.
self assert: msg class verb equals: SIPInviteRequest verb.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 1.
@@ -162,7 +162,7 @@ TestCase subclass: SIPCallAgentTest [
"First assertions for the invite"
self assert: sent size equals: 1.
- msg := SIPParser parse: sent first data.
+ msg := agent parser parse: sent first data.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 1.
self assert: call state equals: SIPCall stateInvite.
@@ -183,7 +183,7 @@ TestCase subclass: SIPCallAgentTest [
"First assertions for the invite"
self assert: sent size equals: 1.
- msg := SIPParser parse: sent first data.
+ msg := agent parser parse: sent first data.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 1.
self assert: call state equals: SIPCall stateInvite.
@@ -195,10 +195,10 @@ TestCase subclass: SIPCallAgentTest [
"Verify that a second message has been sent and it contains an auth result"
self assert: sent size equals: 3.
- msg := SIPParser parse: sent second data.
+ msg := agent parser parse: sent second data.
self assert: msg class verb equals: 'ACK'.
- msg := SIPParser parse: sent third data.
+ msg := agent parser parse: sent third data.
self assert: msg class verb equals: 'INVITE'.
secondBranch := (msg parameter: 'Via' ifAbsent: [nil]) branch.
self deny: branch = secondBranch.
@@ -226,7 +226,7 @@ TestCase subclass: SIPCallAgentTest [
"First assertions for the invite"
self assert: sent size equals: 1.
- msg := SIPParser parse: sent first data.
+ msg := agent parser parse: sent first data.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 1.
self assert: call state equals: SIPCall stateInvite.
@@ -238,10 +238,10 @@ TestCase subclass: SIPCallAgentTest [
"Verify that a second message has been sent and it contains an auth result"
self assert: sent size equals: 3.
- msg := SIPParser parse: sent second data.
+ msg := agent parser parse: sent second data.
self assert: msg class verb equals: 'ACK'.
- msg := SIPParser parse: sent third data.
+ msg := agent parser parse: sent third data.
self assert: msg class verb equals: 'INVITE'.
branch := (msg parameter: 'Via' ifAbsent: [nil]) branch.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 2.
@@ -269,7 +269,7 @@ TestCase subclass: SIPCallAgentTest [
"First assertions for the invite"
self assert: sent size equals: 1.
- msg := SIPParser parse: sent first data.
+ msg := agent parser parse: sent first data.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 1.
self assert: call state equals: SIPCall stateInvite.
@@ -281,10 +281,10 @@ TestCase subclass: SIPCallAgentTest [
"Verify that a second message has been sent and it contains an auth result"
self assert: sent size equals: 3.
- msg := SIPParser parse: sent second data.
+ msg := agent parser parse: sent second data.
self assert: msg class verb equals: 'ACK'.
- msg := SIPParser parse: sent third data.
+ msg := agent parser parse: sent third data.
self assert: msg class verb equals: 'INVITE'.
secondBranch := (msg parameter: 'Via' ifAbsent: [nil]) branch.
self deny: branch = secondBranch.
@@ -309,7 +309,7 @@ TestCase subclass: SIPCallAgentTest [
"Inject a 200 and check the ACK"
transport inject: (self ok: secondBranch callId: callId tag: fromTag tag cseq: 2).
self assert: sent size equals: 4.
- msg := SIPParser parse: (sent at: 4) data.
+ msg := agent parser parse: (sent at: 4) data.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 2.
self assert: call state equals: SIPCall stateSession.
auth := msg parameter: 'Proxy-Authorization' ifAbsent: [nil].
@@ -339,7 +339,7 @@ TestCase subclass: SIPCallAgentTest [
| call msg branch callId fromTag sentNr |
call := self setUpProxyAuthCall.
- msg := SIPParser parse: sent second data.
+ msg := agent parser parse: sent second data.
branch := (msg parameter: 'Via' ifAbsent: [nil]) branch.
callId := (msg parameter: 'Call-ID' ifAbsent: [-1]).
fromTag := (msg parameter: 'From' ifAbsent: [nil]).
@@ -351,7 +351,7 @@ TestCase subclass: SIPCallAgentTest [
self assert: sent size equals: sentNr + 1.
self assert: call state equals: SIPCall stateRemoteHangup.
- msg := SIPParser parse: (sent at: sentNr + 1) data.
+ msg := agent parser parse: (sent at: sentNr + 1) data.
self assert: msg class equals: SIPResponse.
self assert: msg code equals: '200'.
self assert: msg phrase equals: 'OK'.
@@ -365,7 +365,7 @@ TestCase subclass: SIPCallAgentTest [
"First assertions for the invite"
self assert: sent size equals: 1.
- msg := SIPParser parse: sent first data.
+ msg := agent parser parse: sent first data.
self assert: (msg parameter: 'CSeq' ifAbsent: [-1]) number equals: 1.
self assert: call state equals: SIPCall stateInvite.
branch := (msg parameter: 'Via' ifAbsent: [nil]) branch.
@@ -381,7 +381,7 @@ TestCase subclass: SIPCallAgentTest [
self assert: call state equals: SIPCall stateRedirect.
"Check we get the ACK"
- msg := SIPParser parse: sent second data.
+ msg := agent parser parse: sent second data.
self assert: msg class equals: SIPACKRequest.
]
]