Closed sgf closed 6 years ago
Did I missed something?
@sgf that error message is because IRequestManageService
cannot be resolved from the AutoFac container.
To verify this, try adding an explicit registered for IRequestManageService
, e.g.
builder.Register(context => new FakeRequestManageService())
.AsSelf()
.As<IRequestManageService>()
.InstancePerLifetimeScope();
It could also be a bug with the implementation; if so try the recent fork https://github.com/pizycki/xunit.ioc.autofac
@dennisroche thank u reply,still do not work. im create a new TestInterface:
public interface ITestInterface
{
void Msg(string msg);
}
public class TestInterface : ITestInterface
{
public void Msg(string msg)
{
Console.WriteLine(msg);
}
}
//and im do it like this:
builder.Register(context => new TestInterface())
.AsSelf()
.As<ITestInterface>()
.InstancePerLifetimeScope();
i will try recent fork thank u.
@dennisroche maybe the reason is what im using the Nuget package.
Sorry I couldn't help more.
im test much times,its do not work.im not sure whats the problem?
the Test Always output: The following constructor parameters did not have matching fixture data: IRequestManageService requestManageService