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); } }
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); } }