Exemplo n.º 1
0
        public static void FinishedFailedToStatusTest()
        {
            Assert.AreEqual(Status.Success, StateToStatusHelper.FinishedFailedToStatus(true, false));
            Assert.AreEqual(Status.Failure, StateToStatusHelper.FinishedFailedToStatus(false, true));
            Assert.AreEqual(Status.Running, StateToStatusHelper.FinishedFailedToStatus(false, false));
            Assert.AreEqual(Status.Error, StateToStatusHelper.FinishedFailedToStatus(true, true));

            Assert.AreEqual(Status.Success, StateToStatusHelper.FinishedFailedToStatus(true, false, true));
            Assert.AreEqual(Status.Failure, StateToStatusHelper.FinishedFailedToStatus(false, true, true));
            Assert.AreEqual(Status.Running, StateToStatusHelper.FinishedFailedToStatus(false, false, true));
            Assert.AreEqual(Status.Error, StateToStatusHelper.FinishedFailedToStatus(true, true, true));

            Assert.AreEqual(Status.Error, StateToStatusHelper.FinishedFailedToStatus(true, false, false));
            Assert.AreEqual(Status.Error, StateToStatusHelper.FinishedFailedToStatus(false, true, false));
            Assert.AreEqual(Status.Error, StateToStatusHelper.FinishedFailedToStatus(false, false, false));
            Assert.AreEqual(Status.Error, StateToStatusHelper.FinishedFailedToStatus(true, true, false));
        }