public void Init()
        {
            _service = A.Fake<IRunAsService>();
            A.CallTo(() => _service.IsStopped).Returns(false);

            _settings = new Perrich.RunAsService.XmlConfig.XmlConfig();
            _hook = new EmptyHook();
        }
示例#2
0
        public void Init()
        {
            _service = A.Fake<IRunAsService>();
            A.CallTo(() => _service.IsStopped).Returns(false);

            _settings = new Perrich.RunAsService.XmlConfig.XmlConfig();
            _hook = new StopHook();
            Assert.True(_hook.Init(_settings, _service));
        }
示例#3
0
        public void Init()
        {
            _service = A.Fake<IRunAsService>();
            A.CallTo(() => _service.IsStopped).Returns(false);

            _settings = new Perrich.RunAsService.XmlConfig.XmlConfig();
            _settings.LoadXmlFromString("<configuration><restart><times value=\"3\" /></restart></configuration>");
            _hook = new RestartHook();
        }
 public void Init()
 {
     _service = A.Fake<IRunAsService>();
     _settings = new Perrich.RunAsService.XmlConfig.XmlConfig();
     _hook = new EmailSenderHook();
 }