コード例 #1
0
        private void TestVMWareHostConnectDisconnectThreadProc(object o)
        {
            IVMWareTestProvider provider = (IVMWareTestProvider)o;

            Assert.IsTrue(provider.ConnectedVirtualHost.IsConnected);
            for (int i = 0; i < _threadCount; i++)
            {
                provider.Reconnect();
            }
        }
コード例 #2
0
        private void TestVMWareVirtualMachinePowerThreadProc(object o)
        {
            IVMWareTestProvider provider = (IVMWareTestProvider)o;

            Assert.IsTrue(provider.ConnectedVirtualHost.IsConnected);
            for (int i = 0; i < _threadCount; i++)
            {
                ConsoleOutput.WriteLine("CPUs: {0}", provider.VirtualMachine.CPUCount);
                ConsoleOutput.WriteLine("Memory: {0}", provider.PoweredVirtualMachine.MemorySize);
                ConsoleOutput.WriteLine("Powering off ...");
                provider.PoweredVirtualMachine.PowerOff();
                provider.Reconnect();
            }
        }