Create SMO samples project#558
Merged
uc-msft merged 5 commits intomicrosoft:masterfrom May 14, 2019
Merged
Conversation
pull latest from Microsoft/sql-server-samples
* initial SMO sample skeleton project * add linux test runner * change namepsace * add Urn tests * Complete the collection sample * fix a comment
Contributor
Author
|
Is there a way I can create branches in the Microsoft/sql-server-samples repo instead of forking it? I got some kind of permissions problem when I tried. |
|
|
||
| ### Contents | ||
|
|
||
| [About this sample](#about-this-sample)<br/> |
Contributor
Author
There was a problem hiding this comment.
can you elaborate? I don't see any 's
There was a problem hiding this comment.
haha, whoops.
<br />'s is what I meant.
Contributor
Author
There was a problem hiding this comment.
oh it's from the template
| public VisualStudio.TestTools.UnitTesting.TestContext TestContext { get; set; } | ||
|
|
||
| [TestMethod] | ||
| public void Collection_iteration_is_faster_with_SetDefaultInitFields() |
There was a problem hiding this comment.
So overall I like the idea of having actual examples users can run to see the benefits. But it'd definitely be great to also explain how this is actionable for them - ideally every test would have an explanation of what it's demonstrating and how users could use it in their own code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am going to add more snippets-as-unit-tests to this project over time. There have been a fair number of SMO API enhancements the past few years and we are somewhat lacking in documentation. As more devs are trying to write performant apps on top of SMO we need to have better examples on how to use SMO effectively.
I've chosen to experiment with using the unit test format for samples so the assertions provide both documentation and clear description of what benefits the code techniques provide. I welcome input on how to structure the sample and on what kinds of samples to add.