public void TheAutoMockerPushesInMocksAndAPreBuiltStubForAllOfTheConstructorArguments() { AutoMocker <ConcreteClass> autoMocker = createAutoMocker <ConcreteClass>(); var stub = new StubService(); autoMocker.Inject <IMockedService>(stub); var service2 = autoMocker.Get <IMockedService2>(); var service3 = autoMocker.Get <IMockedService3>(); ConcreteClass concreteClass = autoMocker.ClassUnderTest; Assert.AreSame(stub, concreteClass.Service); Assert.AreSame(service2, concreteClass.Service2); Assert.AreSame(service3, concreteClass.Service3); }
public override void BeforeTestClassCreation() { AutoMocker.Inject <MicrosoftAppCredentials>(Credentials); }