Skip to content

Commit 788b0e5

Browse files
author
Vinothini Dharmaraj
committed
updating tests
1 parent c5e60a9 commit 788b0e5

File tree

1 file changed

+0
-86
lines changed

1 file changed

+0
-86
lines changed

sdk/communication/Azure.Communication.CallAutomation/tests/CallMedias/CallMediaAutomatedLiveTests.cs

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,92 +1851,6 @@ public async Task ChoiceRecognizeWithInvalidFileSourceWithValidSourceTest()
18511851
}
18521852
}
18531853

1854-
[RecordedTest]
1855-
public async Task SpeechOrDtmfRecognizeWithMultipleSourcesTest()
1856-
{
1857-
// create caller and receiver
1858-
CommunicationUserIdentifier user = await CreateIdentityUserAsync().ConfigureAwait(false);
1859-
CommunicationUserIdentifier target = await CreateIdentityUserAsync().ConfigureAwait(false);
1860-
CallAutomationClient client = CreateInstrumentedCallAutomationClientWithConnectionString(user);
1861-
CallAutomationClient targetClient = CreateInstrumentedCallAutomationClientWithConnectionString(target);
1862-
string? callConnectionId = null;
1863-
try
1864-
{
1865-
try
1866-
{
1867-
// setup service bus
1868-
var uniqueId = await ServiceBusWithNewCall(user, target);
1869-
var result = await CreateAndAnswerCall(client, targetClient, target, uniqueId, true);
1870-
callConnectionId = result.CallerCallConnectionId;
1871-
var participantToAdd = await CreateIdentityUserAsync().ConfigureAwait(false);
1872-
var callConnection = client.GetCallConnection(callConnectionId);
1873-
1874-
string SpeechToTextVoice = "en-US-NancyNeural";
1875-
RecognizeInputType recognizeInputType = RecognizeInputType.SpeechOrDtmf;
1876-
1877-
// Assert multiple Text Sources
1878-
var playTextSources = new List<PlaySource>() {
1879-
new TextSource("Test prompt1") { VoiceName = SpeechToTextVoice },
1880-
new TextSource("Test prompt2") { VoiceName = SpeechToTextVoice },
1881-
};
1882-
1883-
await VerifyRecognizeFailedEventForMultipleSources(callConnectionId, client, playTextSources, target, recognizeInputType);
1884-
1885-
// Assert combination of text and file source
1886-
var playMultipleSources = new List<PlaySource>() {
1887-
new FileSource(new Uri(TestEnvironment.FileSourceUrl)),
1888-
new TextSource("Test prompt1") { VoiceName = SpeechToTextVoice }
1889-
};
1890-
1891-
await VerifyRecognizeFailedEventForMultipleSources(callConnectionId, client, playMultipleSources, target, recognizeInputType);
1892-
1893-
// Assert combination of text and file source along with single play source
1894-
await VerifyRecognizeFailedEventForMultipleSources(callConnectionId, client, playMultipleSources, target, recognizeInputType,
1895-
new FileSource(new Uri(TestEnvironment.FileSourceUrl)), expectedBadRequestCheck: true);
1896-
1897-
// Assert multiple Text Source with wrong file source
1898-
playMultipleSources = new List<PlaySource>() {
1899-
new FileSource(new Uri("https://dummy.com/dummyurl.wav")),
1900-
new TextSource("Test prompt1") { VoiceName = SpeechToTextVoice }
1901-
};
1902-
1903-
await VerifyRecognizeFailedEventForMultipleSources(callConnectionId, client, playMultipleSources, target, recognizeInputType, null, true);
1904-
1905-
// try hangup
1906-
await client.GetCallConnection(callConnectionId).HangUpAsync(true).ConfigureAwait(false);
1907-
var disconnectedEvent = await WaitForEvent<CallDisconnected>(callConnectionId, TimeSpan.FromSeconds(20));
1908-
Assert.IsNotNull(disconnectedEvent);
1909-
Assert.IsTrue(disconnectedEvent is CallDisconnected);
1910-
Assert.AreEqual(callConnectionId, ((CallDisconnected)disconnectedEvent!).CallConnectionId);
1911-
1912-
try
1913-
{
1914-
// test get properties
1915-
Response<CallConnectionProperties> properties = await client.GetCallConnection(callConnectionId).GetCallConnectionPropertiesAsync().ConfigureAwait(false);
1916-
}
1917-
catch (RequestFailedException ex)
1918-
{
1919-
if (ex.Status == 404)
1920-
{
1921-
callConnectionId = null;
1922-
return;
1923-
}
1924-
}
1925-
}
1926-
catch (Exception)
1927-
{
1928-
throw;
1929-
}
1930-
}
1931-
catch (Exception ex)
1932-
{
1933-
Assert.Fail($"Unexpected error: {ex}");
1934-
}
1935-
finally
1936-
{
1937-
await CleanUpCall(client, callConnectionId);
1938-
}
1939-
}
19401854
[RecordedTest]
19411855
public async Task SpeechOrDtmfRecognizeWithMultipleFileSourcesTest()
19421856
{

0 commit comments

Comments
 (0)