Пример #1
0
        public void StopVMXTest()
        {
            IVMController target   = CreateIVMController();
            bool          expected = true;
            bool          actual;

            actual = target.StopVMX(vmx);
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("このテストメソッドの正確性を確認します。");
        }
Пример #2
0
        protected override void OnStop()
        {
            _timer.Enabled = false;

            if (_invalid_state)
            {
                return;
            }

            if (_control == null)
            {
                WriteLog(
                    "Cannot control VMX currently.", EventLogEntryType.Error);
                return;
            }


            if (!_control.IsRunning(_vmx_file))
            {
                WriteLog(
                    "Specified vmx might not be running.\n" +
                    "vmx file is '{0}'.", EventLogEntryType.FailureAudit, _vmx_file);
                return;
            }

            if (!_control.StopVMX(_vmx_file))
            {
                WriteLog(
                    "Stopping the vmx was failed.\n" +
                    "vmx file is '{0}'.", EventLogEntryType.Error, _vmx_file);
            }
            else
            {
                WriteLog(
                    "Stopping specified vmx was finished successfully.\n" +
                    "vmx file is '{0}'.", EventLogEntryType.Information, _vmx_file);
            }
        }