Support for Examples
See original GitHub issueYesterday, I had an idea about how to add support for examples in MSpec.
I’d like to write this:
[Subject("Examples")]
public class WhenIDoThis
{
Establish context = () => SetUpEverything();
Examples<Example> examples = () =>
{
return new[] { new Example("hello"), new Example("world") };
}
Because<Example> of = example => DoSomething(example);
It should_do_that = () => CheckThat_HoldingForAllExamples();
It<Example> should_do_that_too = example => CheckSomethingExampleSpecific(example);
}
with
public class Example { public Example(string someData) { this.SomeData = someData; } public string SomeData { get; private set; } }
This would allow to add specific examples to a specification.
Of course, the examples should be shown in the reports (e.g. show all Properties of Example, or call ToString on Example).
A goody would be, that an individual example could be run from the R# runner (like TestData of NUnit or InlineData of xUnit)
What do you think about this?
Issue Analytics
- State:
- Created 10 years ago
- Reactions:2
- Comments:30 (11 by maintainers)
Top Results From Across the Web
Examples of "Support" in a Sentence | YourDictionary.com
Learn how to use "support" in a sentence with 500 example sentences on YourDictionary.
Read more >Examples of 'support' in a sentence
Examples from Collins dictionaries ... The vice president insisted that he supported the hard-working people of New York. They pressed the party to...
Read more >How to Use Support with Example Sentences
"We receive great support from our community." ... "We give support to our local small businesses." ... "He is losing the support of...
Read more >Support in a sentence
202+73 sentence examples: 1. One father can support ten children, ten children cannot support one father. 2. A solid bloc of union members ......
Read more >SUPPORT | English meaning - Cambridge Dictionary
to give encouragement and approval to someone or something because you want the person or thing to succeed: The president strongly supported Egypt's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys, it’s been 4 years. Any updates?
What’s the progress on this feature? Its been over a year since it was first described as a useful feature (which it would be). I find the lack of this feature to be the biggest issue using the framework.