Пример #1
0
        public void Add_Project()
        {
            var projectId = _projects.Count() + 1;
            var project   = new ProjectEntity
            {
                ProjectId        = projectId,
                ProjectName      = "Enhancement project",
                StartDate        = "01/01/2019",
                EndDate          = "01/31/2019",
                Priority         = 15,
                ProjectManagerId = 1234567
            };

            _mockRepository.AddProject(project);
            Assert.IsTrue(_projects.Count() == 4);
            ProjectEntity testProject = GetProjectById(projectId);

            Assert.IsNotNull(testProject);
            Assert.AreSame(testProject.GetType(), typeof(ProjectEntity));
            Assert.AreEqual(project.ProjectName, testProject.ProjectName);
            Assert.AreEqual(project.StartDate, testProject.StartDate);
            Assert.AreEqual(project.Priority, testProject.Priority);
            Assert.AreEqual(project.ProjectManagerId, testProject.ProjectManagerId);
        }
 public void AddProject(ProjectEntity project)
 {
     _repo.AddProject(project);
 }