Example #1
0
        public void ExistingWithResource()
        {
            // Get an existing Resource with an Assignment
            Project existingProject = ProjectFactory.ExistingProjectWithResource();

            // Delete the project
            Guid projectId = existingProject.Id;

            Project.DeleteProject(projectId);

            // Check if the Project exists now
            bool exists = ProjectFactory.ProjectExists(projectId);

            Assert.IsFalse(exists);
        }
Example #2
0
        public void Existing()
        {
            // Create an existing object
            Project existingProject = ProjectFactory.ExistingProject();

            // Delete the project
            Guid projectId = existingProject.Id;

            Project.DeleteProject(projectId);

            // Check if the Project exists now
            bool exists = ProjectFactory.ProjectExists(projectId);

            Assert.IsFalse(exists);
        }
Example #3
0
        public void Existing()
        {
            // Create an existing project
            Project existingProject = ProjectFactory.ExistingProject();

            // Get the Project to a different variable
            Guid projectId = existingProject.Id;

            _project = Project.GetProject(projectId);

            // Check objects match
            Assert.IsNotNull(_project);
            Assert.AreEqual(existingProject.Id, _project.Id);

            // Check CSLA properties
            Assert.IsFalse(_project.IsDeleted);
            Assert.IsFalse(_project.IsDirty);
            Assert.IsFalse(_project.IsNew);
            Assert.IsFalse(_project.IsSavable);
            Assert.IsTrue(_project.IsValid);
        }
Example #4
0
 public void WithNewInstanceWithResource()
 {
     BusinessObject = ProjectFactory.NewProjectWithResource();
     SaveBusinessObject();
 }
Example #5
0
 public void WithNewInstanceWithNoAssignments()
 {
     BusinessObject = ProjectFactory.NewProject();
     SaveBusinessObject();
 }