public void InitializeOneBootStrapper() { var bootStrap = new Mock<IBootStrap>(); bootStrap.Setup(x => x.Initialize()).Verifiable(); var globalBoot = new GlobalBootStrapper(); globalBoot.Register(bootStrap.Object); globalBoot.Initialize(); bootStrap.Verify(); }
public void InitializeBootStrappers() { var mockRepository = new MockRepository(MockBehavior.Default); var globalBoot = new GlobalBootStrapper(); for (int i = 0; i < 10; i++) { var bootStrap = mockRepository.Create<IBootStrap>(); bootStrap.Setup(x => x.Initialize()).Verifiable(); globalBoot.Register(bootStrap.Object); } globalBoot.Initialize(); mockRepository.Verify(); }