Create SMO samples project - #558
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
|
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/> |
There was a problem hiding this comment.
nit: The
's are unnecessary
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.
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.
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.