Beispiel #1
0
        public void Project_Fetch()
        {
            var project = BusinessHelper.CreateProjectAndLogon(
                ProjectTestsWithRoleReview.UserName,
                ProjectTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                ProjectService.ProjectFetch(project.ProjectId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
Beispiel #2
0
        public void Project_Delete()
        {
            var project = BusinessHelper.CreateProjectAndLogon(
                ProjectTestsWithRoleReview.UserName,
                ProjectTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                ProjectService.ProjectDelete(project.ProjectId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception != null, "Exception should not be null");
            Assert.IsTrue(exception.GetBaseException() is SecurityException);
        }
        public void Project_Fetch_List()
        {
            BusinessHelper.CreateProjectAndLogon(
                ProjectTestsWithRoleContribute.UserName,
                ProjectTestsWithRoleContribute.UserPassword);

            BusinessHelper.CreateProjectAndLogon(
                ProjectTestsWithRoleContribute.UserName,
                ProjectTestsWithRoleContribute.UserPassword);

            Exception exception = null;

            try
            {
                ProjectService.ProjectFetchInfoList();
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
Beispiel #4
0
        public void Project_Edit()
        {
            var project = BusinessHelper.CreateProjectAndLogon(
                ProjectTestsWithRoleReview.UserName,
                ProjectTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                project = ProjectService.ProjectFetch(project.ProjectId);

                project.Name = DataHelper.RandomString(20);

                ProjectService.ProjectSave(project);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

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