diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-07-08 12:54:31 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-07-08 12:54:31 -0700 |
commit | 530f4dfbba364748cad636602d28485a5ff4dff4 (patch) | |
tree | 0f0a6336a8268f5792f6c03c24fc67aba32e6c79 | |
parent | e82a1aeaa0ad4c5abe1b3dd98d932cd9b19aad5b (diff) | |
download | sendgrid-csharp-530f4dfbba364748cad636602d28485a5ff4dff4.zip sendgrid-csharp-530f4dfbba364748cad636602d28485a5ff4dff4.tar.gz sendgrid-csharp-530f4dfbba364748cad636602d28485a5ff4dff4.tar.bz2 |
Give Prism time to run
-rw-r--r-- | SendGrid/UnitTest/UnitTest.cs | 634 |
1 files changed, 318 insertions, 316 deletions
diff --git a/SendGrid/UnitTest/UnitTest.cs b/SendGrid/UnitTest/UnitTest.cs index 4cccd68..85e246f 100644 --- a/SendGrid/UnitTest/UnitTest.cs +++ b/SendGrid/UnitTest/UnitTest.cs @@ -32,6 +32,8 @@ namespace UnitTest process.StartInfo = startInfo; process.Start(); System.Threading.Thread.Sleep(15000); + } else { + System.Threading.Thread.Sleep(15000); } } @@ -281,10 +283,10 @@ namespace UnitTest 'ips': [ { 'ip': '192.168.1.1' - }, + }, { 'ip': '192.*.*.*' - }, + }, { 'ip': '192.168.1.3/32' } @@ -312,8 +314,8 @@ namespace UnitTest { string data = @"{ 'ids': [ - 1, - 2, + 1, + 2, 3 ] }"; @@ -350,8 +352,8 @@ namespace UnitTest public void test_alerts_post() { string data = @"{ - 'email_to': 'example@example.com', - 'frequency': 'daily', + 'email_to': 'example@example.com', + 'frequency': 'daily', 'type': 'stats_notification' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -411,11 +413,11 @@ namespace UnitTest public void test_api_keys_post() { string data = @"{ - 'name': 'My API Key', - 'sample': 'data', + 'name': 'My API Key', + 'sample': 'data', 'scopes': [ - 'mail.send', - 'alerts.create', + 'mail.send', + 'alerts.create', 'alerts.read' ] }"; @@ -443,9 +445,9 @@ namespace UnitTest public void test_api_keys__api_key_id__put() { string data = @"{ - 'name': 'A New Hope', + 'name': 'A New Hope', 'scopes': [ - 'user.profile.read', + 'user.profile.read', 'user.profile.update' ] }"; @@ -497,8 +499,8 @@ namespace UnitTest public void test_asm_groups_post() { string data = @"{ - 'description': 'Suggestions for products our users might like.', - 'is_default': true, + 'description': 'Suggestions for products our users might like.', + 'is_default': true, 'name': 'Product Suggestions' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -525,8 +527,8 @@ namespace UnitTest public void test_asm_groups__group_id__patch() { string data = @"{ - 'description': 'Suggestions for items our users might like.', - 'id': 103, + 'description': 'Suggestions for items our users might like.', + 'id': 103, 'name': 'Item Suggestions' }"; var group_id = "test_url_param"; @@ -564,7 +566,7 @@ namespace UnitTest { string data = @"{ 'recipient_emails': [ - 'test1@example.com', + 'test1@example.com', 'test2@example.com' ] }"; @@ -592,8 +594,8 @@ namespace UnitTest { string data = @"{ 'recipient_emails': [ - 'exists1@example.com', - 'exists2@example.com', + 'exists1@example.com', + 'exists2@example.com', 'doesnotexists@example.com' ] }"; @@ -632,7 +634,7 @@ namespace UnitTest { string data = @"{ 'recipient_emails': [ - 'test1@example.com', + 'test1@example.com', 'test2@example.com' ] }"; @@ -680,11 +682,11 @@ namespace UnitTest public void test_browsers_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'browsers': 'test_string', - 'end_date': '2016-04-01', - 'limit': 'test_string', - 'offset': 'test_string', + 'aggregated_by': 'day', + 'browsers': 'test_string', + 'end_date': '2016-04-01', + 'limit': 'test_string', + 'offset': 'test_string', 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -700,21 +702,21 @@ namespace UnitTest string data = @"{ 'categories': [ 'spring line' - ], - 'custom_unsubscribe_url': '', - 'html_content': '<html><head><title></title></head><body><p>Check out our spring line!</p></body></html>', - 'ip_pool': 'marketing', + ], + 'custom_unsubscribe_url': '', + 'html_content': '<html><head><title></title></head><body><p>Check out our spring line!</p></body></html>', + 'ip_pool': 'marketing', 'list_ids': [ - 110, + 110, 124 - ], - 'plain_content': 'Check out our spring line!', + ], + 'plain_content': 'Check out our spring line!', 'segment_ids': [ 110 - ], - 'sender_id': 124451, - 'subject': 'New Products for Spring!', - 'suppression_group_id': 42, + ], + 'sender_id': 124451, + 'subject': 'New Products for Spring!', + 'suppression_group_id': 42, 'title': 'March Newsletter' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -728,7 +730,7 @@ namespace UnitTest public void test_campaigns_get() { string queryParams = @"{ - 'limit': 1, + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -744,10 +746,10 @@ namespace UnitTest string data = @"{ 'categories': [ 'summer line' - ], - 'html_content': '<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>', - 'plain_content': 'Check out our summer line!', - 'subject': 'New Products for Summer!', + ], + 'html_content': '<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>', + 'plain_content': 'Check out our summer line!', + 'subject': 'New Products for Summer!', 'title': 'May Newsletter' }"; var campaign_id = "test_url_param"; @@ -859,8 +861,8 @@ namespace UnitTest public void test_categories_get() { string queryParams = @"{ - 'category': 'test_string', - 'limit': 1, + 'category': 'test_string', + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -874,11 +876,11 @@ namespace UnitTest public void test_categories_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'categories': 'test_string', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, + 'aggregated_by': 'day', + 'categories': 'test_string', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -892,12 +894,12 @@ namespace UnitTest public void test_categories_stats_sums_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, - 'sort_by_direction': 'asc', - 'sort_by_metric': 'test_string', + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, + 'sort_by_direction': 'asc', + 'sort_by_metric': 'test_string', 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -911,8 +913,8 @@ namespace UnitTest public void test_clients_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', + 'aggregated_by': 'day', + 'end_date': '2016-04-01', 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -926,8 +928,8 @@ namespace UnitTest public void test_clients__client_type__stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', + 'aggregated_by': 'day', + 'end_date': '2016-04-01', 'start_date': '2016-01-01' }"; var client_type = "test_url_param"; @@ -942,7 +944,7 @@ namespace UnitTest public void test_contactdb_custom_fields_post() { string data = @"{ - 'name': 'pet', + 'name': 'pet', 'type': 'text' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1011,9 +1013,9 @@ namespace UnitTest public void test_contactdb_lists_delete() { string data = @"[ - 1, - 2, - 3, + 1, + 2, + 3, 4 ]"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1072,7 +1074,7 @@ namespace UnitTest public void test_contactdb_lists__list_id__recipients_post() { string data = @"[ - 'recipient_id1', + 'recipient_id1', 'recipient_id2' ]"; var list_id = "test_url_param"; @@ -1087,8 +1089,8 @@ namespace UnitTest public void test_contactdb_lists__list_id__recipients_get() { string queryParams = @"{ - 'list_id': 1, - 'page': 1, + 'list_id': 1, + 'page': 1, 'page_size': 1 }"; var list_id = "test_url_param"; @@ -1115,7 +1117,7 @@ namespace UnitTest public void test_contactdb_lists__list_id__recipients__recipient_id__delete() { string queryParams = @"{ - 'list_id': 1, + 'list_id': 1, 'recipient_id': 1 }"; var list_id = "test_url_param"; @@ -1132,8 +1134,8 @@ namespace UnitTest { string data = @"[ { - 'email': 'jones@example.com', - 'first_name': 'Guy', + 'email': 'jones@example.com', + 'first_name': 'Guy', 'last_name': 'Jones' } ]"; @@ -1149,15 +1151,15 @@ namespace UnitTest { string data = @"[ { - 'age': 25, - 'email': 'example@example.com', - 'first_name': '', + 'age': 25, + 'email': 'example@example.com', + 'first_name': '', 'last_name': 'User' - }, + }, { - 'age': 25, - 'email': 'example2@example.com', - 'first_name': 'Example', + 'age': 25, + 'email': 'example2@example.com', + 'first_name': 'Example', 'last_name': 'User' } ]"; @@ -1172,7 +1174,7 @@ namespace UnitTest public void test_contactdb_recipients_get() { string queryParams = @"{ - 'page': 1, + 'page': 1, 'page_size': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1186,7 +1188,7 @@ namespace UnitTest public void test_contactdb_recipients_delete() { string data = @"[ - 'recipient_id1', + 'recipient_id1', 'recipient_id2' ]"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1220,7 +1222,7 @@ namespace UnitTest public void test_contactdb_recipients_search_get() { string queryParams = @"{ - '%7Bfield_name%7D': 'test_string', + '%7Bfield_name%7D': 'test_string', '{field_name}': 'test_string' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1279,25 +1281,25 @@ namespace UnitTest string data = @"{ 'conditions': [ { - 'and_or': '', - 'field': 'last_name', - 'operator': 'eq', + 'and_or': '', + 'field': 'last_name', + 'operator': 'eq', 'value': 'Miller' - }, + }, { - 'and_or': 'and', - 'field': 'last_clicked', - 'operator': 'gt', + 'and_or': 'and', + 'field': 'last_clicked', + 'operator': 'gt', 'value': '01/02/2015' - }, + }, { - 'and_or': 'or', - 'field': 'clicks.campaign_identifier', - 'operator': 'eq', + 'and_or': 'or', + 'field': 'clicks.campaign_identifier', + 'operator': 'eq', 'value': '513' } - ], - 'list_id': 4, + ], + 'list_id': 4, 'name': 'Last Name Miller' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1323,13 +1325,13 @@ namespace UnitTest string data = @"{ 'conditions': [ { - 'and_or': '', - 'field': 'last_name', - 'operator': 'eq', + 'and_or': '', + 'field': 'last_name', + 'operator': 'eq', 'value': 'Miller' } - ], - 'list_id': 5, + ], + 'list_id': 5, 'name': 'The Millers' }"; string queryParams = @"{ @@ -1375,7 +1377,7 @@ namespace UnitTest public void test_contactdb_segments__segment_id__recipients_get() { string queryParams = @"{ - 'page': 1, + 'page': 1, 'page_size': 1 }"; var segment_id = "test_url_param"; @@ -1390,10 +1392,10 @@ namespace UnitTest public void test_devices_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1407,11 +1409,11 @@ namespace UnitTest public void test_geo_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'country': 'US', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, + 'aggregated_by': 'day', + 'country': 'US', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1425,10 +1427,10 @@ namespace UnitTest public void test_ips_get() { string queryParams = @"{ - 'exclude_whitelabels': 'true', - 'ip': 'test_string', - 'limit': 1, - 'offset': 1, + 'exclude_whitelabels': 'true', + 'ip': 'test_string', + 'limit': 1, + 'offset': 1, 'subuser': 'test_string' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1615,138 +1617,138 @@ namespace UnitTest { string data = @"{ 'asm': { - 'group_id': 1, + 'group_id': 1, 'groups_to_display': [ - 1, - 2, + 1, + 2, 3 ] - }, + }, 'attachments': [ { - 'content': '[BASE64 encoded content block here]', - 'content_id': 'ii_139db99fdb5c3704', - 'disposition': 'inline', - 'filename': 'file1.jpg', - 'name': 'file1', + 'content': '[BASE64 encoded content block here]', + 'content_id': 'ii_139db99fdb5c3704', + 'disposition': 'inline', + 'filename': 'file1.jpg', + 'name': 'file1', 'type': 'jpg' } - ], - 'batch_id': '[YOUR BATCH ID GOES HERE]', + ], + 'batch_id': '[YOUR BATCH ID GOES HERE]', 'categories': [ - 'category1', + 'category1', 'category2' - ], + ], 'content': [ { - 'type': 'text/html', + 'type': 'text/html', 'value': '<html><p>Hello, world!</p><img src=[CID GOES HERE]></img></html>' } - ], + ], 'custom_args': { - 'New Argument 1': 'New Value 1', - 'activationAttempt': '1', + 'New Argument 1': 'New Value 1', + 'activationAttempt': '1', 'customerAccountNumber': '[CUSTOMER ACCOUNT NUMBER GOES HERE]' - }, + }, 'from': { - 'email': 'sam.smith@example.com', + 'email': 'sam.smith@example.com', 'name': 'Sam Smith' - }, - 'headers': {}, - 'ip_pool_name': '[YOUR POOL NAME GOES HERE]', + }, + 'headers': {}, + 'ip_pool_name': '[YOUR POOL NAME GOES HERE]', 'mail_settings': { 'bcc': { - 'email': 'ben.doe@example.com', + 'email': 'ben.doe@example.com', 'enable': true - }, + }, 'bypass_list_management': { 'enable': true - }, + }, 'footer': { - 'enable': true, - 'html': '<p>Thanks</br>The SendGrid Team</p>', + 'enable': true, + 'html': '<p>Thanks</br>The SendGrid Team</p>', 'text': 'Thanks,/n The SendGrid Team' - }, + }, 'sandbox_mode': { 'enable': false - }, + }, 'spam_check': { - 'enable': true, - 'post_to_url': 'http://example.com/compliance', + 'enable': true, + 'post_to_url': 'http://example.com/compliance', 'threshold': 3 } - }, + }, 'personalizations': [ { 'bcc': [ { - 'email': 'sam.doe@example.com', + 'email': 'sam.doe@example.com', 'name': 'Sam Doe' } - ], + ], 'cc': [ { - 'email': 'jane.doe@example.com', + 'email': 'jane.doe@example.com', 'name': 'Jane Doe' } - ], + ], 'custom_args': { - 'New Argument 1': 'New Value 1', - 'activationAttempt': '1', + 'New Argument 1': 'New Value 1', + 'activationAttempt': '1', 'customerAccountNumber': '[CUSTOMER ACCOUNT NUMBER GOES HERE]' - }, + }, 'headers': { - 'X-Accept-Language': 'en', + 'X-Accept-Language': 'en', 'X-Mailer': 'MyApp' - }, - 'send_at': 1409348513, - 'subject': 'Hello, World!', + }, + 'send_at': 1409348513, + 'subject': 'Hello, World!', 'substitutions': { - 'id': 'substitutions', + 'id': 'substitutions', 'type': 'object' - }, + }, 'to': [ { - 'email': 'john.doe@example.com', + 'email': 'john.doe@example.com', 'name': 'John Doe' } ] } - ], + ], 'reply_to': { - 'email': 'sam.smith@example.com', + 'email': 'sam.smith@example.com', 'name': 'Sam Smith' - }, + }, 'sections': { 'section': { - ':sectionName1': 'section 1 text', + ':sectionName1': 'section 1 text', ':sectionName2': 'section 2 text' } - }, - 'send_at': 1409348513, - 'subject': 'Hello, World!', - 'template_id': '[YOUR TEMPLATE ID GOES HERE]', + }, + 'send_at': 1409348513, + 'subject': 'Hello, World!', + 'template_id': '[YOUR TEMPLATE ID GOES HERE]', 'tracking_settings': { 'click_tracking': { - 'enable': true, + 'enable': true, 'enable_text': true - }, + }, 'ganalytics': { - 'enable': true, - 'utm_campaign': '[NAME OF YOUR REFERRER SOURCE]', - 'utm_content': '[USE THIS SPACE TO DIFFERENTIATE YOUR EMAIL FROM ADS]', - 'utm_medium': '[NAME OF YOUR MARKETING MEDIUM e.g. email]', - 'utm_name': '[NAME OF YOUR CAMPAIGN]', + 'enable': true, + 'utm_campaign': '[NAME OF YOUR REFERRER SOURCE]', + 'utm_content': '[USE THIS SPACE TO DIFFERENTIATE YOUR EMAIL FROM ADS]', + 'utm_medium': '[NAME OF YOUR MARKETING MEDIUM e.g. email]', + 'utm_name': '[NAME OF YOUR CAMPAIGN]', 'utm_term': '[IDENTIFY PAID KEYWORDS HERE]' - }, + }, 'open_tracking': { - 'enable': true, + 'enable': true, 'substitution_tag': '%opentrack' - }, + }, 'subscription_tracking': { - 'enable': true, - 'html': 'If you would like to unsubscribe and stop receiving these emails <% clickhere %>.', - 'substitution_tag': '<%click here%>', + 'enable': true, + 'html': 'If you would like to unsubscribe and stop receiving these emails <% clickhere %>.', + 'substitution_tag': '<%click here%>', 'text': 'If you would like to unsubscribe and stop receiveing these emails <% click here %>.' } } @@ -1762,7 +1764,7 @@ namespace UnitTest public void test_mail_settings_get() { string queryParams = @"{ - 'limit': 1, + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1776,9 +1778,9 @@ namespace UnitTest public void test_mail_settings_address_whitelist_patch() { string data = @"{ - 'enabled': true, + 'enabled': true, 'list': [ - 'email1@example.com', + 'email1@example.com', 'example.com' ] }"; @@ -1803,7 +1805,7 @@ namespace UnitTest public void test_mail_settings_bcc_patch() { string data = @"{ - 'email': 'email@example.com', + 'email': 'email@example.com', 'enabled': false }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1827,8 +1829,8 @@ namespace UnitTest public void test_mail_settings_bounce_purge_patch() { string data = @"{ - 'enabled': true, - 'hard_bounces': 5, + 'enabled': true, + 'hard_bounces': 5, 'soft_bounces': 5 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1852,8 +1854,8 @@ namespace UnitTest public void test_mail_settings_footer_patch() { string data = @"{ - 'enabled': true, - 'html_content': '...', + 'enabled': true, + 'html_content': '...', 'plain_content': '...' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1877,7 +1879,7 @@ namespace UnitTest public void test_mail_settings_forward_bounce_patch() { string data = @"{ - 'email': 'example@example.com', + 'email': 'example@example.com', 'enabled': true }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1901,7 +1903,7 @@ namespace UnitTest public void test_mail_settings_forward_spam_patch() { string data = @"{ - 'email': '', + 'email': '', 'enabled': false }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1948,8 +1950,8 @@ namespace UnitTest public void test_mail_settings_spam_check_patch() { string data = @"{ - 'enabled': true, - 'max_score': 5, + 'enabled': true, + 'max_score': 5, 'url': 'url' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1973,7 +1975,7 @@ namespace UnitTest public void test_mail_settings_template_patch() { string data = @"{ - 'enabled': true, + 'enabled': true, 'html_content': '<% body %>' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -1997,11 +1999,11 @@ namespace UnitTest public void test_mailbox_providers_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 1, - 'mailbox_providers': 'test_string', - 'offset': 1, + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 1, + 'mailbox_providers': 'test_string', + 'offset': 1, 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2015,7 +2017,7 @@ namespace UnitTest public void test_partner_settings_get() { string queryParams = @"{ - 'limit': 1, + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2029,8 +2031,8 @@ namespace UnitTest public void test_partner_settings_new_relic_patch() { string data = @"{ - 'enable_subuser_statistics': true, - 'enabled': true, + 'enable_subuser_statistics': true, + 'enabled': true, 'license_key': '' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2064,10 +2066,10 @@ namespace UnitTest public void test_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2081,12 +2083,12 @@ namespace UnitTest public void test_subusers_post() { string data = @"{ - 'email': 'John@example.com', + 'email': 'John@example.com', 'ips': [ - '1.1.1.1', + '1.1.1.1', '2.2.2.2' - ], - 'password': 'johns_password', + ], + 'password': 'johns_password', 'username': 'John@example.com' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2100,8 +2102,8 @@ namespace UnitTest public void test_subusers_get() { string queryParams = @"{ - 'limit': 1, - 'offset': 1, + 'limit': 1, + 'offset': 1, 'username': 'test_string' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2128,11 +2130,11 @@ namespace UnitTest public void test_subusers_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, - 'start_date': '2016-01-01', + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, + 'start_date': '2016-01-01', 'subusers': 'test_string' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2146,11 +2148,11 @@ namespace UnitTest public void test_subusers_stats_monthly_get() { string queryParams = @"{ - 'date': 'test_string', - 'limit': 1, - 'offset': 1, - 'sort_by_direction': 'asc', - 'sort_by_metric': 'test_string', + 'date': 'test_string', + 'limit': 1, + 'offset': 1, + 'sort_by_direction': 'asc', + 'sort_by_metric': 'test_string', 'subuser': 'test_string' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2164,12 +2166,12 @@ namespace UnitTest public void test_subusers_stats_sums_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 1, - 'offset': 1, - 'sort_by_direction': 'asc', - 'sort_by_metric': 'test_string', + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 1, + 'offset': 1, + 'sort_by_direction': 'asc', + 'sort_by_metric': 'test_string', 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2222,7 +2224,7 @@ namespace UnitTest public void test_subusers__subuser_name__monitor_put() { string data = @"{ - 'email': 'example@example.com', + 'email': 'example@example.com', 'frequency': 500 }"; var subuser_name = "test_url_param"; @@ -2237,7 +2239,7 @@ namespace UnitTest public void test_subusers__subuser_name__monitor_post() { string data = @"{ - 'email': 'example@example.com', + 'email': 'example@example.com', 'frequency': 50000 }"; var subuser_name = "test_url_param"; @@ -2274,10 +2276,10 @@ namespace UnitTest public void test_subusers__subuser_name__stats_monthly_get() { string queryParams = @"{ - 'date': 'test_string', - 'limit': 1, - 'offset': 1, - 'sort_by_direction': 'asc', + 'date': 'test_string', + 'limit': 1, + 'offset': 1, + 'sort_by_direction': 'asc', 'sort_by_metric': 'test_string' }"; var subuser_name = "test_url_param"; @@ -2292,9 +2294,9 @@ namespace UnitTest public void test_suppression_blocks_get() { string queryParams = @"{ - 'end_time': 1, - 'limit': 1, - 'offset': 1, + 'end_time': 1, + 'limit': 1, + 'offset': 1, 'start_time': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2308,9 +2310,9 @@ namespace UnitTest public void test_suppression_blocks_delete() { string data = @"{ - 'delete_all': false, + 'delete_all': false, 'emails': [ - 'example1@example.com', + 'example1@example.com', 'example2@example.com' ] }"; @@ -2347,7 +2349,7 @@ namespace UnitTest public void test_suppression_bounces_get() { string queryParams = @"{ - 'end_time': 1, + 'end_time': 1, 'start_time': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2361,9 +2363,9 @@ namespace UnitTest public void test_suppression_bounces_delete() { string data = @"{ - 'delete_all': true, + 'delete_all': true, 'emails': [ - 'example@example.com', + 'example@example.com', 'example2@example.com' ] }"; @@ -2403,9 +2405,9 @@ namespace UnitTest public void test_suppression_invalid_emails_get() { string queryParams = @"{ - 'end_time': 1, - 'limit': 1, - 'offset': 1, + 'end_time': 1, + 'limit': 1, + 'offset': 1, 'start_time': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2419,9 +2421,9 @@ namespace UnitTest public void test_suppression_invalid_emails_delete() { string data = @"{ - 'delete_all': false, + 'delete_all': false, 'emails': [ - 'example1@example.com', + 'example1@example.com', 'example2@example.com' ] }"; @@ -2480,9 +2482,9 @@ namespace UnitTest public void test_suppression_spam_reports_get() { string queryParams = @"{ - 'end_time': 1, - 'limit': 1, - 'offset': 1, + 'end_time': 1, + 'limit': 1, + 'offset': 1, 'start_time': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2496,9 +2498,9 @@ namespace UnitTest public void test_suppression_spam_reports_delete() { string data = @"{ - 'delete_all': false, + 'delete_all': false, 'emails': [ - 'example1@example.com', + 'example1@example.com', 'example2@example.com' ] }"; @@ -2513,9 +2515,9 @@ namespace UnitTest public void test_suppression_unsubscribes_get() { string queryParams = @"{ - 'end_time': 1, - 'limit': 1, - 'offset': 1, + 'end_time': 1, + 'limit': 1, + 'offset': 1, 'start_time': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2588,11 +2590,11 @@ namespace UnitTest public void test_templates__template_id__versions_post() { string data = @"{ - 'active': 1, - 'html_content': '<%body%>', - 'name': 'example_version_name', - 'plain_content': '<%body%>', - 'subject': '<%subject%>', + 'active': 1, + 'html_content': '<%body%>', + 'name': 'example_version_name', + 'plain_content': '<%body%>', + 'subject': '<%subject%>', 'template_id': 'ddb96bbc-9b92-425e-8979-99464621b543' }"; var template_id = "test_url_param"; @@ -2607,10 +2609,10 @@ namespace UnitTest public void test_templates__template_id__versions__version_id__patch() { string data = @"{ - 'active': 1, - 'html_content': '<%body%>', - 'name': 'updated_example_name', - 'plain_content': '<%body%>', + 'active': 1, + 'html_content': '<%body%>', + 'name': 'updated_example_name', + 'plain_content': '<%body%>', 'subject': '<%subject%>' }"; var template_id = "test_url_param"; @@ -2662,7 +2664,7 @@ namespace UnitTest public void test_tracking_settings_get() { string queryParams = @"{ - 'limit': 1, + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2699,11 +2701,11 @@ namespace UnitTest public void test_tracking_settings_google_analytics_patch() { string data = @"{ - 'enabled': true, - 'utm_campaign': 'website', - 'utm_content': '', - 'utm_medium': 'email', - 'utm_source': 'sendgrid.com', + 'enabled': true, + 'utm_campaign': 'website', + 'utm_content': '', + 'utm_medium': 'email', + 'utm_source': 'sendgrid.com', 'utm_term': '' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2750,11 +2752,11 @@ namespace UnitTest public void test_tracking_settings_subscription_patch() { string data = @"{ - 'enabled': true, - 'html_content': 'html content', - 'landing': 'landing page html', - 'plain_content': 'text content', - 'replace': 'replacement tag', + 'enabled': true, + 'html_content': 'html content', + 'landing': 'landing page html', + 'plain_content': 'text content', + 'replace': 'replacement tag', 'url': 'url' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2821,7 +2823,7 @@ namespace UnitTest public void test_user_password_put() { string data = @"{ - 'new_password': 'new_password', + 'new_password': 'new_password', 'old_password': 'old_password' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2835,8 +2837,8 @@ namespace UnitTest public void test_user_profile_patch() { string data = @"{ - 'city': 'Orange', - 'first_name': 'Example', + 'city': 'Orange', + 'first_name': 'Example', 'last_name': 'User' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2860,7 +2862,7 @@ namespace UnitTest public void test_user_scheduled_sends_post() { string data = @"{ - 'batch_id': 'YOUR_BATCH_ID', + 'batch_id': 'YOUR_BATCH_ID', 'status': 'pause' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2920,7 +2922,7 @@ namespace UnitTest public void test_user_settings_enforced_tls_patch() { string data = @"{ - 'require_tls': true, + 'require_tls': true, 'require_valid_cert': false }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -2967,18 +2969,18 @@ namespace UnitTest public void test_user_webhooks_event_settings_patch() { string data = @"{ - 'bounce': true, - 'click': true, - 'deferred': true, - 'delivered': true, - 'dropped': true, - 'enabled': true, - 'group_resubscribe': true, - 'group_unsubscribe': true, - 'open': true, - 'processed': true, - 'spam_report': true, - 'unsubscribe': true, + 'bounce': true, + 'click': true, + 'deferred': true, + 'delivered': true, + 'dropped': true, + 'enabled': true, + 'group_resubscribe': true, + 'group_unsubscribe': true, + 'open': true, + 'processed': true, + 'spam_report': true, + 'unsubscribe': true, 'url': 'url' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3015,9 +3017,9 @@ namespace UnitTest public void test_user_webhooks_parse_settings_post() { string data = @"{ - 'hostname': 'myhostname.com', - 'send_raw': false, - 'spam_check': true, + 'hostname': 'myhostname.com', + 'send_raw': false, + 'spam_check': true, 'url': 'http://email.myhosthame.com' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3041,8 +3043,8 @@ namespace UnitTest public void test_user_webhooks_parse_settings__hostname__patch() { string data = @"{ - 'send_raw': true, - 'spam_check': false, + 'send_raw': true, + 'spam_check': false, 'url': 'http://newdomain.com/parse' }"; var hostname = "test_url_param"; @@ -3079,10 +3081,10 @@ namespace UnitTest public void test_user_webhooks_parse_stats_get() { string queryParams = @"{ - 'aggregated_by': 'day', - 'end_date': '2016-04-01', - 'limit': 'test_string', - 'offset': 'test_string', + 'aggregated_by': 'day', + 'end_date': '2016-04-01', + 'limit': 'test_string', + 'offset': 'test_string', 'start_date': '2016-01-01' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3096,15 +3098,15 @@ namespace UnitTest public void test_whitelabel_domains_post() { string data = @"{ - 'automatic_security': false, - 'custom_spf': true, - 'default': true, - 'domain': 'example.com', + 'automatic_security': false, + 'custom_spf': true, + 'default': true, + 'domain': 'example.com', 'ips': [ - '192.168.1.1', + '192.168.1.1', '192.168.1.2' - ], - 'subdomain': 'news', + ], + 'subdomain': 'news', 'username': 'john@example.com' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3118,10 +3120,10 @@ namespace UnitTest public void test_whitelabel_domains_get() { string queryParams = @"{ - 'domain': 'test_string', - 'exclude_subusers': 'true', - 'limit': 1, - 'offset': 1, + 'domain': 'test_string', + 'exclude_subusers': 'true', + 'limit': 1, + 'offset': 1, 'username': 'test_string' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3165,7 +3167,7 @@ namespace UnitTest public void test_whitelabel_domains__domain_id__patch() { string data = @"{ - 'custom_spf': true, + 'custom_spf': true, 'default': false }"; var domain_id = "test_url_param"; @@ -3253,8 +3255,8 @@ namespace UnitTest public void test_whitelabel_ips_post() { string data = @"{ - 'domain': 'example.com', - 'ip': '192.168.1.1', + 'domain': 'example.com', + 'ip': '192.168.1.1', 'subdomain': 'email' }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3268,8 +3270,8 @@ namespace UnitTest public void test_whitelabel_ips_get() { string queryParams = @"{ - 'ip': 'test_string', - 'limit': 1, + 'ip': 'test_string', + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); @@ -3316,12 +3318,12 @@ namespace UnitTest public void test_whitelabel_links_post() { string data = @"{ - 'default': true, - 'domain': 'example.com', + 'default': true, + 'domain': 'example.com', 'subdomain': 'mail' }"; string queryParams = @"{ - 'limit': 1, + 'limit': 1, 'offset': 1 }"; Dictionary<String, String> headers = new Dictionary<String, String>(); |