public void SetRecordingToWavFile_Success() { WebCallResult res = _tempGreeting.SetRecordingToWavFile("Dummy.wav", 1033, true); Assert.IsTrue(res.Success, "Failed to upload greeting stream for 1033:" + res); Thread.Sleep(1000); var oStreams = _tempGreeting.GetGreetingStreamFiles(true); Assert.IsNotNull(oStreams, "Null streams list returned from fetch"); Assert.IsTrue(oStreams.Count == 1, "Streams count not 1 after upload of stream"); oStreams[0].DumpAllProps(); Console.WriteLine(oStreams[0].ToString()); res = oStreams[0].SetGreetingWavFile("Dummy.wav", true); Assert.IsTrue(res.Success, "Failed to upload greeting stream existing stream object:" + res); string strFileName = Guid.NewGuid().ToString() + ".wav"; res = oStreams[0].GetGreetingWavFile(strFileName); Assert.IsTrue(res.Success, "Failed downloading WAV file from stream:" + res); Assert.IsTrue(File.Exists(strFileName), "Wav file download did not create local file:" + strFileName); try { File.Delete(strFileName); } catch (Exception ex) { Assert.Fail("Could not delete local temporary file:" + strFileName + ", error=" + ex); } }