Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

"Text editor unit test integration" is not supported #24

Closed
lextm opened this issue Jun 12, 2016 · 2 comments
Closed

"Text editor unit test integration" is not supported #24

lextm opened this issue Jun 12, 2016 · 2 comments

Comments

@lextm
Copy link
Collaborator

lextm commented Jun 12, 2016

Xamarin Studio 6 introduces the concept of "Enable text editor unit test integration" under Preferences | Text Editor | Source Analysis, which is not enabled by default.

It works for NUnit, but not yet for xUnit. Should investigate to see how the integration should be implemented.

@tstivers1990
Copy link

tstivers1990 commented Jun 13, 2016

In order to get this to work you will most likely have to create your own implementation of https://github.com/mono/monodevelop/blob/master/main/src/addins/CSharpBinding/MonoDevelop.CSharp.UnitTests/CSharpNUnitSourceCodeLocationFinder.cs. I'm fairly certain the reason it currently doesn't work is because the implementation used currently is the NUnit implementation, which probably won't work with xUnit.

Also, you may notice that the nodes don't appear for [InlineData] attributes. They also don't appear for NUnit [TestCase] attributes like they're supposed to. This is a bug which I've reported.

https://bugzilla.xamarin.com/show_bug.cgi?id=41750

In your current code you set the testCaseMethodAttributeMarker in Manifest.addin.xml to XUnit.TheoryAttribute. The first thing I notice is that the namespace should be Xunit rather than XUnit. I also notice that in the NUnit addin, this is set to NUnit.TestCaseAttribute which more closely matches Xunit.InlineDataAttribute. So I have a feeling that it would be better to use Xunit.InlineDataAttribute for this.

@lextm
Copy link
Collaborator Author

lextm commented Dec 5, 2017

Please read #77 for more details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants