Example #1
0
        protected override void AdditionalSetup()
        {
            base.AdditionalSetup();

            _container = new BandIdContainer(Guid.NewGuid());
            MockHelper.RegisterInstance<IBandIdResolver>(_container);
            MockHelper.RegisterInstance<IBandIdInstaller>(_container);

            AppCatalog = MockHelper.CreateAndRegisterMock<IAppCatalog>();
            BandCatalog = MockHelper.CreateAndRegisterMock<IBandCatalog>();
            CatalogsContainer = MockHelper.CreateAndRegisterMock<ICatalogsContainer>();

            CatalogsContainer
                .Expect(container => container.AppCatalog)
                .Return(AppCatalog)
                .Repeat.Any();
            CatalogsContainer
                .Expect(container => container.BandCatalog)
                .Return(BandCatalog)
                .Repeat.Any();
            CatalogsContainer.Replay();
        }
Example #2
0
        protected override void AdditionalSetup()
        {
            base.AdditionalSetup();

            _container = new BandIdContainer(Guid.NewGuid());
            MockHelper.RegisterInstance <IBandIdResolver>(_container);
            MockHelper.RegisterInstance <IBandIdInstaller>(_container);

            AppCatalog        = MockHelper.CreateAndRegisterMock <IAppCatalog>();
            BandCatalog       = MockHelper.CreateAndRegisterMock <IBandCatalog>();
            CatalogsContainer = MockHelper.CreateAndRegisterMock <ICatalogsContainer>();

            CatalogsContainer
            .Expect(container => container.AppCatalog)
            .Return(AppCatalog)
            .Repeat.Any();
            CatalogsContainer
            .Expect(container => container.BandCatalog)
            .Return(BandCatalog)
            .Repeat.Any();
            CatalogsContainer.Replay();
        }