Skip to content

Improving twilio dynamic validator for test credentials#549

Merged
eddynaka merged 5 commits into
mainfrom
users/ednakamu/improving-twilio-validator
Sep 8, 2021
Merged

Improving twilio dynamic validator for test credentials#549
eddynaka merged 5 commits into
mainfrom
users/ednakamu/improving-twilio-validator

Conversation

@eddynaka

@eddynaka eddynaka commented Sep 3, 2021

Copy link
Copy Markdown
Collaborator

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • ReleaseHistory.md updated for non-trivial changes
  • Added unit tests

{
string content = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
if (!string.IsNullOrEmpty(content)
&& content.IndexOf("Resource not accessible with Test Account Credentials", StringComparison.OrdinalIgnoreCase) != -1)

@michaelcfanning michaelcfanning Sep 8, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OrdinalIgnoreCase

Just use ordinal. #Closed

{
string content = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
if (!string.IsNullOrEmpty(content)
&& content.IndexOf("Resource not accessible with Test Account Credentials", StringComparison.OrdinalIgnoreCase) != -1)

@michaelcfanning michaelcfanning Sep 8, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StringComparison

just use contains #Closed

HttpContents = new List<HttpContent> { new StringContent(@"
{
""code"": 20008,
""message"": ""Resource not accessible with Test Account Credentials"",

@michaelcfanning michaelcfanning Sep 8, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resource not accessible with Test Account Credentials

add as internal const string, use interpolated string to access it here. #Closed

@michaelcfanning michaelcfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@eddynaka eddynaka enabled auto-merge (squash) September 8, 2021 23:45
@eddynaka eddynaka merged commit 63f9473 into main Sep 8, 2021
@eddynaka eddynaka deleted the users/ednakamu/improving-twilio-validator branch September 8, 2021 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants