public void CheckPBDsCorrectNoVMs()
        {
            var mockConnection = GetMockConnectionWithCache();
            var host           = GetHostLiveness(mockConnection, true, false, true);
            //Execute the check
            var check   = new PBDsPluggedCheck(host);
            var problem = check.RunCheck();

            Assert.IsNull(problem);
        }
        public void CheckPBDsCorrectVM()
        {
            var mockConnection = GetMockConnectionWithCache();
            var host           = GetHostLiveness(mockConnection, true, false, true);
            var vmMock         = new MockVMBuilder("0", mockConnection);
            var vm             = vmMock.VM;

            vm.power_state = vm_power_state.Running;
            var listofchanges = new List <ObjectChange>()
            {
                new ObjectChange(vm.GetType(), "0", vm)
            };

            host.Connection.Cache.UpdateFrom(host.Connection, listofchanges);
            //Execute the check
            var check   = new PBDsPluggedCheck(host);
            var problem = check.RunCheck();

            Assert.IsNull(problem);
        }