//Check that the host is live and it does not return any problem. public void CheckHostEnabled() { var fake = new Mock<IXenConnection>(); var host = GetHostLiveness(fake,true,false,true); //Execute the check var check = new HostLivenessCheck(host); var problem = check.RunCheck(); Assert.IsNull(problem); fake.VerifyAll(); }
public void CheckHostNotLive() { var mock = new Mock<IXenConnection>(); var host = GetHostLiveness(mock, true, false, false); //Execute the check var check = new HostLivenessCheck(host); var problem = check.RunCheck(); Assert.AreEqual(typeof(HostNotLive), problem.GetType()); mock.VerifyAll(); }
public void CheckHostDisabled() { var fake = new Mock<IXenConnection>(); var host = GetHostLiveness(fake, false, false, true); //Execute the check var check = new HostLivenessCheck(host); var problem = check.RunCheck(); Assert.AreEqual(typeof(HostMaintenanceMode),problem.GetType()); fake.VerifyAll(); }