Closed rCartoux closed 6 years ago
Amazing! Looking into it now, but at first glance seems quite solid.
Thanks! I am thinking now about some problems I didn't see:
Ok thanks! will do
You're right, the "accepted tokens" list might need a bit of shuffling around. Also https://github.com/Microsoft/UnitTestBoilerplateGenerator/wiki/Custom-Format-Tokens will need an update.
With your latest version I'm getting an exception when trying to generate from ClassWithMethods to VSTestCases:
System.NotSupportedException: Parameter type not supported
at UnitTestBoilerplate.Services.TestGenerationService.GetArgumentDescriptors(List1 argumentList, SemanticModel semanticModel, MockFramework mockFramework) in D:\git\UnitTestBoilerplateGenerator\src\Services\TestGenerationService.cs:line 324 at UnitTestBoilerplate.Services.TestGenerationService.<CollectTestGenerationContextAsync>d__9.MoveNext() in D:\git\UnitTestBoilerplateGenerator\src\Services\TestGenerationService.cs:line 238 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at UnitTestBoilerplate.Services.TestGenerationService.
Hi David, yes I just saw thx, I have a look
Robin
On 30 June 2018 at 14:06, David Rickard notifications@github.com wrote:
With your latest version I'm getting an exception when trying to generate from ClassWithMethods to VSTestCases:
System.NotSupportedException: Parameter type not supported
at UnitTestBoilerplate.Services.TestGenerationService. GetArgumentDescriptors(List1 argumentList, SemanticModel semanticModel, MockFramework mockFramework) in D:\git\UnitTestBoilerplateGenerator\ src\Services\TestGenerationService.cs:line 324 at UnitTestBoilerplate.Services.TestGenerationService.< CollectTestGenerationContextAsync>d9.MoveNext() in D:\git\ UnitTestBoilerplateGenerator\src\Services\TestGenerationService.cs:line 238 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter. HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime. CompilerServices.TaskAwaiter1.GetResult() at UnitTestBoilerplate.Services.TestGenerationService.d15.MoveNext() in D:\git\UnitTestBoilerplateGenerator\src\Services\TestGenerationService.cs:line 343 --- End of stack trace from previous location where exception was thrown
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter. HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at UnitTestBoilerplate.Services.TestGenerationService.< GenerateUnitTestFileAsync>d6.MoveNext() in D:\git\ UnitTestBoilerplateGenerator\src\Services\TestGenerationService.cs:line 57 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter. HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime. CompilerServices.TaskAwaiter1.GetResult() at UnitTestBoilerplate.ViewModel.CreateUnitTestBoilerplateViewModel.d54.MoveNext() in D:\git\UnitTestBoilerplateGenerator\src\ViewModel\ CreateUnitTestBoilerplateViewModel.cs:line 181 --- End of stack trace from previous location where exception was thrown
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter. HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at UnitTestBoilerplate.ViewModel.CreateUnitTestBoilerplateViewModel.<<get_ CreateUnitTestCommand>b__53_0>d.MoveNext() in D:\git\ UnitTestBoilerplateGenerator\src\ViewModel\CreateUnitTestBoilerplateViewModel.cs:line 166
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/UnitTestBoilerplateGenerator/pull/28#issuecomment-401540145, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8YZF3oy4D7PuGezXKovuZsY73VuaJ7ks5uB3fqgaJpZM4U1IK9 .
Awesome! Can you re-run the self-test to update the expected output for the default method changes you made? And let me know when you're all done with the changes and I'll ship it.
Ok!
Unfortunately there are still some cases I need to check like arguments which are one or multidimensional arrays, params/ref/out modifiers etc
Then I ll do the test cases, maybe add some new ones. I let you know when its ready
Thx for the feedback
Cheers
On 30 June 2018 at 14:48, David Rickard notifications@github.com wrote:
Awesome! Can you re-run the self-test to update the expected output for the default method changes you made? And let me know when you're all done with the changes and I'll ship it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/UnitTestBoilerplateGenerator/pull/28#issuecomment-401542393, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8YZC1DCHppUQobsJpET7fbLOWl_WmUks5uB4GfgaJpZM4U1IK9 .
should be ok now
Now getting this when I invoke the create unit test boilerplate option:
Thanks again. Released with 1.9. Would you be able to also update the "tokens" wiki page? https://github.com/Microsoft/UnitTestBoilerplateGenerator/wiki/Custom-Format-Tokens
sure!
Also a super easy way to help is rate it on the marketplace: https://marketplace.visualstudio.com/items?itemName=RandomEngy.UnitTestBoilerplateGenerator it only has a handful of reviews. There is a guy who hasn't updated his 1-star review months after I added xUnit support for him. :/
I have updated the custom format tokens page in my wiki fork : new TestMethods and TestedMethodName formats https://github.com/rCartoux/UnitTestBoilerplateGenerator-wiki
(not sure how to proceed with wiki issues / pull requests)
I'll just copy/paste. Thanks!