A FOSS .net tool leveraging the roslyn tool-chain to transition unit test projects away from MSTest towards xUnit.
If you'd like to contribute, please take a look at the following files
Roslyn based MSTest to xUnit converter
License: MIT License
A FOSS .net tool leveraging the roslyn tool-chain to transition unit test projects away from MSTest towards xUnit.
If you'd like to contribute, please take a look at the following files
It looks like ClassCleanup
and ClassInitialize
were completely forgotten in v1 of this project. These should be pretty reasonable to implement since they mirror TestCleanup
and TestInitialize
.
Basically the code in 6d75cf8 was a really long and unpleasant way to figure out that almost everything in this project is wrong or bad.
Instead of making changes as we determine that they need to be made, we need to queue the changes to be made after the analysis.
What I've found is that references to nodes in the code need to be reacquired before actually doing anything if a change is made.
So what needs to happen...I think... is that we need to store some kind of structure containing a hard position to a bit of code that can't be "lost" and a transform function. Then once the changes have been queued up, let them rip using public static TRoot ReplaceNodes<TRoot, TNode>(this TRoot root, IEnumerable<TNode> nodes, Func<TNode, TNode, SyntaxNode> computeReplacementNode)
found in Microsoft.CodeAnalysis.SyntaxNodeExtensions
.
It looks like the type argument is doing something to prevent the visitor transforming the method call.
[TestCategory("Integration")]
should be converted to
[Trait("Category","MyCategoryName")]
Currently TestCategory
is completely ignored.
This should get the travis build working reliably
These don't have equivalents in xUnit...
Assert.Fail could be Assert.True(false, "message");
Assert.Inconclusive should probably just get commented out... with a TODO so the visual studio task list will pick it up
Not sure what we should do about this, there might not be a direct mapping.
Just comment these out so they're not build errors?
We need to convert the message to a comment since xUnit refuses to support this overload.
We need to make sure preprocessor directives are on newlines.
I found some cases where #region
and #endregion
ended up on the same line as a brace and this is a compile time error.
Convert ExpectedException to lambda improperly quotes the message if available.
It also doesn't properly format the newly created lambda.
An example of the failure:
Assert.Equal(""Some message"", ex.Message);} }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.