示例#1
0
        protected void OnTimerEvent(object source, ElapsedEventArgs e)
        {
            if (_control == null)
            {
                WriteLog(
                    "Cannot control VMX currently.", EventLogEntryType.Error);
                return;
            }

            if (!_control.IsRunning(_vmx_file))
            {
                _invalid_state = true;
                WriteLog(
                    "The VMX should be running, but not.\n" +
                    "vmx file is '{0}'.", EventLogEntryType.Warning, _vmx_file);
                Stop();
            }
        }
示例#2
0
        public void IsRunningTest()
        {
            IVMController target = CreateIVMController();
            IVMController vmrun  = new VMControllerByVMRun(new VMWareInfo().VMCore);

            bool expected = vmrun.IsRunning(vmx);
            bool actual;

            actual = target.IsRunning(vmx);
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("このテストメソッドの正確性を確認します。");
        }