Trying to get this simple test to work:
public class MyClass
{
public string Text { get; set; }
public List<string> Comments { get; set; }
}
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var fixture = new Fixture();
fixture.Customize<string>(c => c.FromSeed(s => s)); //Just return propertyname, no GUID appended
var test = fixture.Create<MyClass>();
}
}
but I keep getting the error
The decorated
ISpecimenBuildercould not create a specimen based on the request: System.String. This can happen if the request represents an interface or abstract class; if this is the case, register anISpecimenBuilderthat can create specimens based on the request. If this happens in a strongly typedBuild<T>expression, try supplying a factory using one of theIFactoryComposer<T>methods.`
If I remove the Customize line, is seems to work...
Not quite sure what I need to do to make it work