public void Resolve_ReturnsWhatHasBeenGotten() { IReallyCoolService gotten = container.Get <IReallyCoolService>(); IReallyCoolService resolved = container.Resolve <IReallyCoolService>(); Assert.AreSame(gotten, resolved); }
public void Get_ReturnsStubs_ThatAreReadyForRecording() { container.Mark <IReallyCoolService>().Stubbed(); IReallyCoolService service = container.Get <IReallyCoolService>(); SetupResult.For(service.GetName()).Return("Ayende"); mocks.ReplayAll(); Assert.AreEqual("Ayende", service.GetName()); }
private void VerifyIsMock(IReallyCoolService mock) { Assert.IsNotNull(mock, "mock is not null"); mocks.BackToRecordAll(); // making sure there are no expectations other than the one created here Expect.Call(mock.SayHello); mocks.ReplayAll(); VerifyWillThrow <ExpectationViolationException>( mocks.VerifyAll ); }
public ComponentBeingConfigured(IReallyCoolService reallyCoolService) { ReallyCoolService = reallyCoolService; }
public ComponentBeingConfigured(IReallyCoolService reallyCoolService, ICollectionOfServices services) { ReallyCoolService = reallyCoolService; Services = services; }
internal ComponentBeingConfiguredWithInternalCtor(IReallyCoolService reallyCoolService, ICollectionOfServices services) { ReallyCoolService = reallyCoolService; Services = services; }
public ComponentBeingConfiguredWithInternalCtor(IReallyCoolService reallyCoolService) { ReallyCoolService = reallyCoolService; }
private ComponentBeingConfiguredWithPrivateCtor(IReallyCoolService reallyCoolService, ICollectionOfServices services) { ReallyCoolService = reallyCoolService; Services = services; }
public ComponentBeingConfiguredWithPrivateCtor(IReallyCoolService reallyCoolService) : this(reallyCoolService, null) { }
internal InternalComponentBeingConfigured(IReallyCoolService reallyCoolService, ICollectionOfServices services) { ReallyCoolService = reallyCoolService; Services = services; }