Ejemplo n.º 1
0
        public async Task GenerateTemplatePreviewGeneratesExpectedRequest()
        {
            Dictionary <string, dynamic> personalisation = new Dictionary <string, dynamic> {
                { "name", "someone" }
            };

            var o = new JObject
            {
                { "personalisation", JObject.FromObject(personalisation) }
            };

            MockRequest(Constants.fakeTemplatePreviewResponseJson,
                        client.GET_TEMPLATE_URL + Constants.fakeTemplateId + "/preview", AssertValidRequest, HttpMethod.Post);

            var response = await client.GenerateTemplatePreviewAsync(Constants.fakeTemplateId, personalisation);
        }