question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Examples

See original GitHub issue

Yesterday, 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:open
  • Created 10 years ago
  • Reactions:2
  • Comments:30 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ivan-prodanovcommented, Oct 7, 2017

Guys, it’s been 4 years. Any updates?

1reaction
dotnetprofessionalcommented, Apr 25, 2014

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found