-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Reduce code size with set up (constructor) * Move Json to external files, reuse Json content for sync/async variants * Tackle duplication * Reuse CallCommand instantiation * Reduce duplication * Extract Json in individual files * Reuse StopStream Json response * Reuse Json response * Reuse Json responses * Reuse Json responses * Reuse Json responses * Reuse Json responses * Reuse Json responses
- Loading branch information
Showing
31 changed files
with
855 additions
and
1,011 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"status": "started", | ||
"direction": "outbound", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22" | ||
} |
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
Vonage.Test.Unit/Data/VoiceTests/CreateCallWithEndpointAndNcco-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"to": [ | ||
{ | ||
"number": "14155550100", | ||
"type": "phone" | ||
} | ||
], | ||
"from": { | ||
"number": "14155550100", | ||
"type": "phone" | ||
}, | ||
"ncco": [ | ||
{ | ||
"action": "talk", | ||
"text": "Hello World" | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
Vonage.Test.Unit/Data/VoiceTests/CreateCallWithEndpointAndNcco-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"status": "started", | ||
"direction": "outbound", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22" | ||
} |
2 changes: 1 addition & 1 deletion
2
...s/TestCreateCallWithRandomFromNumber.json → ...eateCallWithRandomFromNumber-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
{ | ||
"to": [ | ||
{ | ||
"number": "14155550100", | ||
|
6 changes: 6 additions & 0 deletions
6
Vonage.Test.Unit/Data/VoiceTests/CreateCallWithRandomFromNumber-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"status": "started", | ||
"direction": "outbound", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22" | ||
} |
18 changes: 18 additions & 0 deletions
18
Vonage.Test.Unit/Data/VoiceTests/CreateCallWithStringParameters-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"to": [ | ||
{ | ||
"number": "14155550100", | ||
"type": "phone" | ||
} | ||
], | ||
"from": { | ||
"number": "14155550100", | ||
"type": "phone" | ||
}, | ||
"ncco": [ | ||
{ | ||
"action": "talk", | ||
"text": "Hello World" | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
Vonage.Test.Unit/Data/VoiceTests/CreateCallWithStringParameters-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"status": "started", | ||
"direction": "outbound", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Vonage.Test.Unit/Data/VoiceTests/CreateCallWithUnicodeCharacters-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"status": "started", | ||
"direction": "outbound", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22" | ||
} |
25 changes: 25 additions & 0 deletions
25
Vonage.Test.Unit/Data/VoiceTests/GetSpecificCall-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"_links": { | ||
"self": { | ||
"href": "/calls/63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} | ||
}, | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22", | ||
"to": { | ||
"type": "phone", | ||
"number": "447700900000" | ||
}, | ||
"from": { | ||
"type": "phone", | ||
"number": "447700900001" | ||
}, | ||
"status": "started", | ||
"direction": "outbound", | ||
"rate": "0.39", | ||
"price": "23.40", | ||
"duration": "60", | ||
"start_time": "2020-01-01 12:00:00", | ||
"end_time": "2020-01-01 12:00:00", | ||
"network": "65512" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"count": 100, | ||
"page_size": 10, | ||
"record_index": 0, | ||
"_links": { | ||
"self": { | ||
"href": "/calls?page_size=10&record_index=20&order=asc" | ||
} | ||
}, | ||
"_embedded": { | ||
"calls": [ | ||
{ | ||
"_links": { | ||
"self": { | ||
"href": "/calls/63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} | ||
}, | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356", | ||
"conversation_uuid": "CON-f972836a-550f-45fa-956c-12a2ab5b7d22", | ||
"to": { | ||
"type": "phone", | ||
"number": "447700900000" | ||
}, | ||
"from": { | ||
"type": "phone", | ||
"number": "447700900001" | ||
}, | ||
"status": "started", | ||
"direction": "outbound", | ||
"rate": "0.39", | ||
"price": "23.40", | ||
"duration": "60", | ||
"start_time": "2020-01-01 12:00:00", | ||
"end_time": "2020-01-01 12:00:00", | ||
"network": "65512" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"digits": "1234" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"message": "DTMF sent", | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"stream_url": [ | ||
"https://example.com/waiting.mp3" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"message": "Stream started", | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} |
7 changes: 7 additions & 0 deletions
7
Vonage.Test.Unit/Data/VoiceTests/StartStreamWithCredentials-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"stream_url": [ | ||
"https://example.com/waiting.mp3" | ||
], | ||
"loop": 0, | ||
"level": "0.4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"text": "Hello. How are you today?" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"message": "Talk started", | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} |
9 changes: 9 additions & 0 deletions
9
Vonage.Test.Unit/Data/VoiceTests/StartTalkWithCredentials-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"text": "Hello. How are you today?", | ||
"voice_name": "salli", | ||
"loop": 0, | ||
"level": "0.4", | ||
"language": "en-US", | ||
"style": 1, | ||
"premium": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"message": "Stream stopped", | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"message": "Talk stopped", | ||
"uuid": "63f61863-4a51-4f6b-86e1-46edebcf9356" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/VoiceTests/UpdateCallAsync-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"action": "earmuff" | ||
} |
9 changes: 9 additions & 0 deletions
9
Vonage.Test.Unit/Data/VoiceTests/UpdateCallWithActionsType-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"action": "$action", | ||
"destination": { | ||
"type": "ncco", | ||
"url": [ | ||
"https://example.com/ncco.json" | ||
] | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Vonage.Test.Unit/Data/VoiceTests/UpdateCallWithCredentials-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"action": "transfer", | ||
"destination": { | ||
"type": "ncco", | ||
"url": [ | ||
"https://example.com/ncco.json" | ||
] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Vonage.Test.Unit/Data/VoiceTests/UpdateCallWithInlineNcco-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"action": "transfer", | ||
"destination": { | ||
"type": "ncco", | ||
"ncco": [ | ||
{ | ||
"action": "talk", | ||
"text": "Hello World" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.