jcansdale / TestDriven.Net-Issues

Issue tracking for TestDriven.Net
https://github.com/jcansdale/TestDriven.Net-Issues/issues
24 stars 2 forks source link

Add support for targeting more F# types/methods #118

Open jcansdale opened 6 years ago

jcansdale commented 6 years ago

Asking @TIHan about this here: https://twitter.com/jcansdale/status/1017660377201610753

The code to support this in C# looks like this:

        async Task DocCommentIdCaretPosAsync(IVsEditorAdaptersFactoryService editorAdapter, IVsTextManager textManager)
        {
            ErrorHandler.ThrowOnFailure(textManager.GetActiveView(1, null, out IVsTextView activeView));
            activeView.GetCaretPos(out int line, out int col);
            activeView.GetNearestPosition(line, col, out int pos, out int vspace);

            var textView = editorAdapter.GetWpfTextView(activeView);

            var document = textView.TextSnapshot.GetOpenDocumentInCurrentContextWithChanges();
            var semanticModel = await document.GetSemanticModelAsync();
            var symbol = semanticModel.GetEnclosingSymbol(pos);
            Console.WriteLine(symbol.GetDocumentationCommentId());
        }

I just need to find the F# equivalent! 😄

Add support for top level namespace declaration in FSharp files. Currently TestDriven.Net only looks for module declarations.

See also: https://stackoverflow.com/questions/44360348/f-unit-test-error-xunit-net-testdriven-net https://twitter.com/rahulpnath/status/1006407482963456001