public void Status_Fetch()
        {
            Exception exception = null;

            var status = BusinessHelper.CreateStatusAndLogon(
                StatusTestsWithRoleReview.UserName, StatusTestsWithRoleReview.UserPassword);

            try
            {
                StatusService.StatusFetch(status.StatusId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
        public void Status_Delete()
        {
            var status = BusinessHelper.CreateStatusAndLogon(
                StatusTestsWithRoleReview.UserName, StatusTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                StatusService.StatusDelete(status.StatusId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception != null, "Exception should not be null");
            Assert.IsTrue(exception.GetBaseException() is SecurityException);
        }
예제 #3
0
        public void Status_Fetch_List()
        {
            Exception exception = null;

            BusinessHelper.CreateStatusAndLogon(
                StatusTestsWithRoleContribute.UserName, StatusTestsWithRoleContribute.UserPassword);

            BusinessHelper.CreateStatusAndLogon(
                StatusTestsWithRoleContribute.UserName, StatusTestsWithRoleContribute.UserPassword);

            try
            {
                StatusService.StatusFetchInfoList();
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
        public void Status_Edit()
        {
            var status = BusinessHelper.CreateStatusAndLogon(
                StatusTestsWithRoleReview.UserName, StatusTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                status = StatusService.StatusFetch(status.StatusId);

                status.Name = DataHelper.RandomString(20);

                StatusService.StatusSave(status);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

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