예제 #1
0
        public void Initialize()
        {
            lock (this)
            {
                _appDirectApiMock       = Substitute.For <IAppDirectApi>();
                _cachedAppDirectApiMock = Substitute.For <ICachedAppDirectApi>();

                var kernel = ServiceLocator.Kernel;
                kernel.Rebind <IAppDirectApi>().ToConstant(_appDirectApiMock);
                kernel.Rebind <ICachedAppDirectApi>().ToConstant(_cachedAppDirectApiMock);
            }
        }
예제 #2
0
        public void Initialize()
        {
            lock (this)
            {
                _appDirectApiMock = Substitute.For<IAppDirectApi>();
                _cachedAppDirectApiMock = Substitute.For<ICachedAppDirectApi>();

                var kernel = ServiceLocator.Kernel;
                kernel.Rebind<IAppDirectApi>().ToConstant(_appDirectApiMock);
                kernel.Rebind<ICachedAppDirectApi>().ToConstant(_cachedAppDirectApiMock);
            }
        }