Dear Remco,
I am using generics to implement simple dependency injection mechanism (see below). However, NCrunch does not mark the generic lines as covered with tests.
Is this intentional behavior?
Many thanks in advance!
internal class Deprojector : DeprojectorImpl<DefaultCreator> {};
internal class DeprojectorImpl<Creator> where Creator : ICreator, new()
{
private ImagingAdapters.IPipeline pipeline;
public DeprojectorImpl() {
pipeline = (new Creator()).CreatePipeline();
}
[TestFixture]
public class Test
{
[Test]
public void Create() {
new DeprojectorImpl<MockCreator>();
}
}