예제 #1
0
        public void SetupConsulListener()
        {
            _consulSimulator = new ConsulSimulator(ConsulPort);
            _testingKernel   = new TestingKernel <ConsoleLog>(k =>
            {
                _environment = Substitute.For <IEnvironment>();
                _environment.ConsulAddress.Returns($"{CurrentApplicationInfo.HostName}:{ConsulPort}");
                _environment.Zone.Returns(Zone);
                k.Rebind <IEnvironment>().ToMethod(_ => _environment);

                k.Rebind <Func <ConsulConfig> >().ToMethod(_ => () => _consulConfig);
            });
        }
예제 #2
0
 public void OneTimeSetup()
 {
     _consulSimulator = new ConsulSimulator(ConsulPort);
 }
 public override void OneTimeSetUp()
 {
     _consulSimulator = new ConsulSimulator(ConsulPort);
     base.OneTimeSetUp();
 }