-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Communication] - SMS - Add Tests and Clean Up #19149
Conversation
/azp run net - communication - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run net - communication - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments, plus i assume you're going to update the samples
Assert.True(ex.Message.Contains("400")); | ||
Console.WriteLine(ex.Message); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing
@@ -30,15 +30,13 @@ public async Task SendingSmsMessage() | |||
#region Snippet:Azure_Communication_Sms_Tests_Troubleshooting | |||
try | |||
{ | |||
#region Snippet:Azure_Communication_Sms_Tests_SendAsync | |||
SmsSendResult result = await client.SendAsync( | |||
//@@ from: "+18001230000" // Phone number acquired on your Azure Communication resource | |||
//@@ to: "+18005670000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the //@@ if it's no longer in a region?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still within the troubleshooting snippet (line 30)
message: "Hi"); | ||
Console.WriteLine($"Sms id: {result.MessageId}"); | ||
SmsSendResult sendResult = await smsClient.SendAsync( | ||
from: "<from-phone-number>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a comment like this would be helpful, let's them know the format
// Your E.164 formatted phone number used to send SMS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Idea, I'll add that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a minor comment
{ | ||
Console.WriteLine(ex.Message); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: newline
|
||
Assert.AreNotEqual(firstMessageResult.MessageId, secondMessageResult.MessageId); | ||
Assert.True(firstMessageResult.Successful); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider having a helper method to verify successful messages? You can also use it for the other happy case tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion! Thanks
Merge Cognitive Services - Language pillar version 2022-05-15-preview to main (Azure#19186) * Updated May-1 preview to include changes from March-1 preview (Azure#18580) * Updated May-1 preview to include changes from March-1 preview * Fixed a missed api version update in an example file Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com> * [Language API 2022-05-01-Preview]Conversation API Async - Conversational Summarization and Conversational PII (Azure#17847) * Adds base for updating Language from version preview/2022-02-01-preview to version 2022-04-01-preview * Updates readme * Updates API version in new specs and examples * [Language API 2022-04-01-Preview] Feature conversation PII redaction and issue resolution summarization * Add Issue Resolution Summary * Address comments * address pretty chek and spell check issues * address file name mismatch issue * typo * Add IRD updates * Add IRD Schema changes * Response Files content update * Address feedback * Address PR comments * Address comments * Add the May API version * Address comments * Remove 04-01 and address comments * Update specification/cognitiveservices/data-plane/Language/preview/2022-05-01-preview/common.json Co-authored-by: Heath Stewart <heaths@microsoft.com> * Update specification/cognitiveservices/data-plane/Language/preview/2022-05-01-preview/common.json Co-authored-by: Heath Stewart <heaths@microsoft.com> * Update specification/cognitiveservices/data-plane/Language/preview/2022-05-01-preview/analyzeconversations.json Co-authored-by: Heath Stewart <heaths@microsoft.com> * Update specification/cognitiveservices/data-plane/Language/preview/2022-05-01-preview/analyzeconversations.json Co-authored-by: Heath Stewart <heaths@microsoft.com> * Update specification/cognitiveservices/data-plane/Language/preview/2022-05-01-preview/textanalytics.json Co-authored-by: Heath Stewart <heaths@microsoft.com> * Address feedback V-1. * Address all comments expect model + enum descriptions * Fx validations * Missed files * Conversation Item modality issue * Update PII Task * Address Spec validation errors * Updates * Fix PII issues * Add readonly * Update schema * Updates * Bring back Text Conversation Item * Update example * Space in Json * Address comments * Address one more comments * Fix model validation * Fix * Update spec * Address comments * Move requestStatistics, prebuiltResult, error and warnings object to common * Address circular dependency Co-authored-by: Abigail Hartman <Abigail.Hahn@microsoft.com> Co-authored-by: Heath Stewart <heaths@microsoft.com> * Rename version from 2022-05-01-preview to 2022-05-15-preview (Azure#18737) * Update CLU swagger (Azure#18739) Co-authored-by: Chong Tang <chot@microsoft.com> * Use azure-sdk-for-net-track2 for validation (Azure#18755) * Bidishac/update field description (#18787) * Update the messaging on the parameter type * Update the documentation of the redactionSource field * Update specification/cognitiveservices/data-plane/Language/preview/2022-05-15-preview/analyzeconversations.json Co-authored-by: Heath Stewart <heaths@microsoft.com> Co-authored-by: Chong Tang <ct4ew@virginia.edu> Co-authored-by: Heath Stewart <heaths@microsoft.com> * Unify the runtime and authoring APIs (Azure#18837) * unifying single classification and multi classification to return array of class (Azure#18902) * Renaming in 2022-05-15-preview (Azure#18929) Co-authored-by: Chong Tang <chot@microsoft.com> * Rename 'summary' in summaryAspects to 'issue' (Azure#18941) * Rename 'summary' in summaryAspects to 'issue' * Merge issues * Update model version value * Merge 2022-05-01-GA authoring updates and "LUIS" string case update into 2022-05-15-preview branch (Azure#18943) * Merge 2022-05-01-GA files changes into 2022-05-15-preview branch * Address Avocado issues and revert case update for Luis * Add the missing error codes * Fix avocado * Avocado fix * Add api-version parameter to cancel job endpoint (Azure#18986) * Add api-version parameter to cancel job endpoint * Fix taskState and jobState * Revert "Fix taskState and jobState" This reverts commit 148dd2183249add89a090721db36a14c2b15d9bd. * Update LUIS to Luis in model names (Azure#19012) * Copy QuestionAnswering definitions to common.json and refer them in analyzeconversations.json (Azure#19031) Co-authored-by: Chong Tang <chot@microsoft.com> * Added fhir feature updates to 2022-05-15-preview (Azure#19092) Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com> * Add cancel endpoint for conversations (Azure#19025) * Add cancel endpoint for conversations * Update examples path * Make the input for transcriptConversationItem optional * Bidishac/update enum name (Azure#19149) * Update name to CreditCard * Update entity categories for PII for build * Keep SSN * Revert "Keep SSN" This reverts commit 77a92119ebd71cf5d5c7f201d402514756289ec2. * Update readme.md Co-authored-by: Abigail Hartman <Abigail.Hahn@microsoft.com> Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com> Co-authored-by: Bidisha Chakraborty <29803402+bidisha-c@users.noreply.github.com> Co-authored-by: Chong Tang <ct4ew@virginia.edu> Co-authored-by: Chong Tang <chot@microsoft.com> Co-authored-by: Mohamed Abbas <moaba@microsoft.com> Co-authored-by: Nourhan <92883092+nourhaanfarid@users.noreply.github.com>
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
Draft
mode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csproj
andAssemblyInfo.cs
files have been updated with the new version of the SDK. Please double check nuget.org current release version.Additional management plane SDK specific contribution checklist:
Note: Only applies to
Microsoft.Azure.Management.[RP]
orAzure.ResourceManager.[RP]
Management plane SDK Troubleshooting
new service
label and/or contact assigned reviewer.Verify Code Generation
step, please ensure:generate.ps1/cmd
to generate this PR instead of callingautorest
directly.Please pay attention to the @microsoft.csharp version output after running generate.ps1. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version,
Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.