Example #1
0
        public void Task_Fetch()
        {
            Exception exception = null;

            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleReview.UserName, TaskTestsWithRoleReview.UserPassword);

            try
            {
                TaskService.TaskFetch(task.TaskId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
Example #2
0
        public void Task_Delete()
        {
            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleReview.UserName, TaskTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                TaskService.TaskDelete(task.TaskId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception != null, "Exception should not be null");
            Assert.IsTrue(exception.GetBaseException() is SecurityException);
        }
        public void Task_Delete()
        {
            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleContribute.UserName,
                TaskTestsWithRoleContribute.UserPassword);

            Exception exception = null;

            try
            {
                TaskService.TaskDelete(task.TaskId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
Example #4
0
        public void Task_Edit()
        {
            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleReview.UserName, TaskTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                task = TaskService.TaskFetch(task.TaskId);

                task.Description = DataHelper.RandomString(100);

                TaskService.TaskSave(task);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception != null, "Exception should not be null");
            Assert.IsTrue(exception.GetBaseException() is SecurityException);
        }
Example #5
0
        public void Task_Can_Write_To_Is_Archived_Property()
        {
            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTests.UserName,
                TaskTests.UserPassword);

            Exception exception = null;

            try
            {
                task = TaskService.TaskFetch(task.TaskId);

                task.IsArchived = !task.IsArchived;

                TaskService.TaskSave(task);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, string.Format("Exception should be null, but is: {0}", exception));
        }
        public void Task_Edit()
        {
            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleContribute.UserName,
                TaskTestsWithRoleContribute.UserPassword);

            Exception exception = null;

            try
            {
                task = TaskService.TaskFetch(task.TaskId);

                task.Description = DataHelper.RandomString(100);

                TaskService.TaskSave(task);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
        public void Task_Fetch_List()
        {
            BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleContribute.UserName,
                TaskTestsWithRoleContribute.UserPassword);

            BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleContribute.UserName,
                TaskTestsWithRoleContribute.UserPassword);

            Exception exception = null;

            try
            {
                TaskService.TaskFetchInfoList();
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
        public void Task_Cannot_Write_To_Is_Archived_Property()
        {
            var task = BusinessHelper.CreateTaskAndLogon(
                TaskTestsWithRoleContribute.UserName,
                TaskTestsWithRoleContribute.UserPassword);

            Exception exception = null;

            try
            {
                task = TaskService.TaskFetch(task.TaskId);

                task.IsArchived = !task.IsArchived;

                TaskService.TaskSave(task);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception != null, "Exception should not be null");
            Assert.IsTrue(exception.GetBaseException() is SecurityException, "Exception should be of type SecurityException");
        }