@@ -58,39 +58,25 @@ public void CallAutomationModelFactoryCanInstantiateTranscriptionData()
5858 var text = "Hello World" ;
5959 var format = "display" ;
6060 var confidence = 0.95 ;
61- var offset = 1000L ;
62- var duration = 2000L ;
63- var words = new List < WordData > { CallAutomationModelFactory . WordData ( "Hello" , 1000 , 500 ) } ;
61+ ulong offset = 1000 ;
62+ ulong duration = 2000 ;
63+ var words = new List < WordData > { new WordData { Text = "Hello" , Offset = 1000 , Duration = 500 } } ;
6464 var participantRawID = "participant123" ;
65- var resultState = TranscriptionResultState . Final ;
65+ var resultState = "final" ;
6666
6767 var transcriptionData = CallAutomationModelFactory . TranscriptionData ( text , format , confidence , offset , duration , words , participantRawID , resultState ) ;
6868
6969 Assert . AreEqual ( text , transcriptionData . Text ) ;
7070 Assert . AreEqual ( format , transcriptionData . Format ) ;
7171 Assert . AreEqual ( confidence , transcriptionData . Confidence ) ;
72- Assert . AreEqual ( TimeSpan . FromTicks ( offset ) , transcriptionData . Offset ) ;
73- Assert . AreEqual ( TimeSpan . FromTicks ( duration ) , transcriptionData . Duration ) ;
72+ Assert . AreEqual ( offset , transcriptionData . Offset ) ;
73+ Assert . AreEqual ( duration , transcriptionData . Duration ) ;
7474 Assert . AreEqual ( CommunicationIdentifier . FromRawId ( participantRawID ) , transcriptionData . Participant ) ;
75- Assert . AreEqual ( resultState , transcriptionData . ResultState ) ;
75+ Assert . AreEqual ( resultState , transcriptionData . ResultStatus ) ;
7676 Assert . IsNotNull ( transcriptionData . Words ) ;
7777 Assert . AreEqual ( 1 , transcriptionData . Words . Count ( ) ) ;
7878 }
7979
80- [ Test ]
81- public void CallAutomationModelFactoryCanInstantiateWordData ( )
82- {
83- var text = "Hello" ;
84- var offset = 1000L ;
85- var duration = 500L ;
86-
87- var wordData = CallAutomationModelFactory . WordData ( text , offset , duration ) ;
88-
89- Assert . AreEqual ( text , wordData . Text ) ;
90- Assert . AreEqual ( TimeSpan . FromTicks ( offset ) , wordData . Offset ) ;
91- Assert . AreEqual ( TimeSpan . FromTicks ( duration ) , wordData . Duration ) ;
92- }
93-
9480 [ Test ]
9581 public void CallAutomationModelFactoryCanInstantiateOutStreamingData ( )
9682 {
@@ -384,17 +370,15 @@ public void CallAutomationModelFactoryCanInstantiatePlayFailed()
384370 var correlationId = "correlation123" ;
385371 var operationContext = "testContext" ;
386372 var resultInformation = CallAutomationModelFactory . ResultInformation ( 400 , 1 , "Failed" ) ;
387- var failedPlaySourceIndex = 0 ;
388373
389374 var eventResult = CallAutomationModelFactory . PlayFailed (
390- callConnectionId , serverCallId , correlationId , operationContext , resultInformation , failedPlaySourceIndex ) ;
375+ callConnectionId , serverCallId , correlationId , operationContext , resultInformation ) ;
391376
392377 Assert . AreEqual ( callConnectionId , eventResult . CallConnectionId ) ;
393378 Assert . AreEqual ( serverCallId , eventResult . ServerCallId ) ;
394379 Assert . AreEqual ( correlationId , eventResult . CorrelationId ) ;
395380 Assert . AreEqual ( operationContext , eventResult . OperationContext ) ;
396381 Assert . AreEqual ( resultInformation , eventResult . ResultInformation ) ;
397- Assert . AreEqual ( failedPlaySourceIndex , eventResult . FailedPlaySourceIndex ) ;
398382 }
399383
400384 [ Test ]
@@ -409,7 +393,7 @@ public void CallAutomationModelFactoryCanInstantiateContinuousDtmfRecognitionTon
409393 var operationContext = "testContext" ;
410394
411395 var eventResult = CallAutomationModelFactory . ContinuousDtmfRecognitionToneReceived (
412- sequenceId , tone , callConnectionId , serverCallId , correlationId , resultInformation , operationContext ) ;
396+ resultInformation , sequenceId , tone , operationContext , callConnectionId , serverCallId , correlationId ) ;
413397
414398 Assert . AreEqual ( sequenceId , eventResult . SequenceId ) ;
415399 Assert . AreEqual ( tone , eventResult . Tone ) ;
@@ -427,13 +411,14 @@ public void CallAutomationModelFactoryCanInstantiateRecordingStateChanged()
427411 var serverCallId = "server123" ;
428412 var correlationId = "correlation123" ;
429413 var recordingId = "recording123" ;
414+ var operationContext = "testContext" ;
430415 var state = RecordingState . Active ;
431416 var startDateTime = DateTimeOffset . UtcNow ;
432417 var recordingKind = RecordingKind . AzureCommunicationServices ;
433418 var resultInformation = CallAutomationModelFactory . ResultInformation ( 200 , 0 , "Success" ) ;
434419
435- var eventResult = CallAutomationModelFactory . RecordingStateChanged (
436- callConnectionId , serverCallId , correlationId , recordingId , state , startDateTime , recordingKind , resultInformation ) ;
420+ var eventResult = CallAutomationModelFactory . RecordingStateChanged ( recordingId ,
421+ state , startDateTime , recordingKind , operationContext , resultInformation , callConnectionId , serverCallId , correlationId ) ;
437422
438423 Assert . AreEqual ( callConnectionId , eventResult . CallConnectionId ) ;
439424 Assert . AreEqual ( serverCallId , eventResult . ServerCallId ) ;
0 commit comments