public void TestCreateFromTts()
{
string responseJson = GetJsonPayload("/campaigns/campaignSoundsApi/response/uploadSound.json");
string requestJson = GetJsonPayload("/campaigns/campaignSoundsApi/request/createFromTts.json");
var restRequest = MockRestResponse(responseJson);
TextToSpeech textToSpeech = new TextToSpeech
{
Voice = Voice.MALE1,
Message = "This is a TTS sound"
};
ResourceId id = Client.CampaignSoundsApi.CreateFromTts(textToSpeech);
Assert.That(Serializer.Serialize(id), Is.EqualTo(responseJson));
Assert.AreEqual(Method.POST, restRequest.Value.Method);
var requestBodyParam = restRequest.Value.Parameters.FirstOrDefault(p => p.Type == ParameterType.RequestBody);
Assert.That(requestBodyParam.Value, Is.EqualTo(requestJson));
}