Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        //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();
        }