public CreateSound(CfCreateSound cfCreateSound) { Name = cfCreateSound.Name; Item = cfCreateSound.Item.GetType() == typeof(CfCreateSoundRecordingCall) ? new CreateSoundRecordingCall(((CfCreateSoundRecordingCall)cfCreateSound.Item).ToNumber) : cfCreateSound.Item; SoundTextVoice = cfCreateSound.SoundTextVoice; }
public void Test_CreateSoundComplete() { var createSound = new CfCreateSound { Name = "SoundText_1", Item = "Text sound test", SoundTextVoice = "FEMALE1" }; var id = Client.CreateSound(createSound, CfSoundFormat.Mp3); Assert.IsNotNull(id); }
public void Test_CreateSoundMandatoryFieldsRecordingCall() { var createSound = new CfCreateSound { Name = "SoundRecordingCall_1", Item = new CfCreateSoundRecordingCall { ToNumber = VerifyFromNumber }, }; var id = Client.CreateSound(createSound, CfSoundFormat.Mp3); Assert.IsNotNull(id); }
public void Test_CreateSoundMandatoryFields() { var stream = File.OpenRead("../../Files/test.mp3"); var fileBytes = new byte[stream.Length]; stream.Read(fileBytes, 0, fileBytes.Length); stream.Close(); var createSound = new CfCreateSound { Item = fileBytes, }; var id = Client.CreateSound(createSound, CfSoundFormat.Mp3); Assert.IsNotNull(id); }
public void Test_CreateSoundInvalidData() { var stream = File.OpenRead("../../Files/test.png"); var fileBytes = new byte[stream.Length]; stream.Read(fileBytes, 0, fileBytes.Length); stream.Close(); var createSound = new CfCreateSound { Item = fileBytes, }; AssertClientException <WebException, FaultException <ServiceFaultInfo> >(() => Client.CreateSound(createSound, CfSoundFormat.Mp3)); }
public long CreateSound(CfCreateSound cfCreateSound, CfSoundFormat cfSoundFormat) { return(CallService.CreateSound(new CreateSound(cfCreateSound))); }
public long CreateSound(CfCreateSound cfCreateSound, CfSoundFormat cfSoundFormat) { var resource = BaseRequest <ResourceReference>(HttpMethod.Post, new CreateSound(cfCreateSound), new CallfireRestRoute <Call>(null, CallRestRouteObjects.Sound, null), cfSoundFormat); return(resource.Id); }