OmniSharp / generator-aspnet

yo generator for ASP.NET Core
877 stars 168 forks source link

Add a subgenerator for xUnit template file #528

Closed peterblazejewicz closed 5 years ago

peterblazejewicz commented 8 years ago

I'd like to propose to add subgenerator for xUnit example test class: yo aspnet:xunit It could be either based on a template I'm using with VS right now: https://github.com/jsakamoto/xUnitTestProjectTemplate/blob/master/Project%20Template%20Source/UnitTest1.cs or a template based on current file used in xUnit project template: https://github.com/OmniSharp/generator-aspnet/blob/master/templates/projects/unittest/SampleTest.cs http://xunit.github.io/docs/getting-started-desktop.html I'd base using on existing class template: https://github.com/OmniSharp/generator-aspnet/blob/master/templates/class.cs with using Xunit added.

Thanks!

sayedihashimi commented 8 years ago

Thanks @peterblazejewicz

I think basing the content on https://github.com/jsakamoto/xUnitTestProjectTemplate/blob/master/Project%20Template%20Source/UnitTest1.cs is better for a subgenerator. Since the subgenerator will be used many times the simplified content is preferred because it shows how to author a test and has the least amount of code that needs to be deleted before use.

For a project template having https://github.com/OmniSharp/generator-aspnet/blob/master/templates/projects/unittest/SampleTest.cs makes more sense than inside of a subgenerator.

peterblazejewicz commented 8 years ago

@sayedihashimi Thanks!. Yeah, I though the same. I'm using that template at work and I'm missing it now when using aspnet5 at home.

sayedihashimi commented 5 years ago

We are shutting this repo down, it's been replaced with dotnet new.