public void CheckPBDsCorrectNoVMs() { var mockConnection = GetMockConnectionWithCache(); var host = GetHostLiveness(mockConnection, true, false, true); //Execute the check var check = new PBDsPluggedCheck(host); var problems = check.RunAllChecks(); Assert.IsEmpty(problems); }
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 problems = check.RunAllChecks(); Assert.IsEmpty(problems); }