This is just a quick script that can help convert a .Tests.csproj which was originally written for MS Test over to using xUnit. It probably doesn’t cover every conversion aspect, but it can get you moving in the right direction.
What it will convert:
- Replace using Microsoft.VisualStudio.TestTools.UnitTesting; with using Xunit;
- Remove [TestClass]
- Replace [TestMethod] with [Fact]
- Replace Assert.AreEqual with Assert.Equal
- Replace Assert.IsTrue with Assert.True
- Replace Assert.IsFalse with Assert.False
- Replace Assert.IsNull with Assert.Null
- Replace Assert.IsNotNull with Assert.NotNull
0 comments:
Post a Comment