A unit test generation extension for Visual Studio that aims to always produce code that compiles - covering the basic cases automatically and preparing as much as it can for the complex cases.
Get the extension from the Visual Studio Marketplace:
Alternatively see the releases on GitHub:
Demonstrates how Unitverse generates tests for generic methods
public class GenericSource
{
public void DoStuff<T>(Guid g, DateTime dtParam, T theThing, int? thing2)
{
}
}
public class GenericSourceTests
{
private readonly GenericSource _testClass;
public GenericSourceTests()
{
_testClass = new GenericSource();
}
[Fact]
public void CanCallDoStuff()
{
// Arrange
var g = new Guid("8286d046-9740-a3e4-95cf-ff46699c73c4");
var dtParam = DateTime.UtcNow;
var theThing = "TestValue607156385";
var thing2 = 1321446349;
// Act
_testClass.DoStuff<T>(g, dtParam, theThing, thing2);
// Assert
throw new NotImplementedException("Create or modify test");
}
}