mercredi 24 août 2016

Is possible to be in charge of creating the test class when using Xunit?

I have a test class with constructor the needs an IService.

public class ConsumerTests
{
    private readonly IService _service;
    public ConsumerTests(IService servie)
    {
      _service = service;
    }

    [Fact]
    public void Should_()
    {
       //use _service
    }
}

I want to plugin my DI container of choice to build the test class.

Is this possible with Xunit?

Aucun commentaire:

Enregistrer un commentaire