Esempio n. 1
0
 public AuditTeamDataMock(Guid projectId, Guid auditorId)
 {
     AuditTeam = new AuditTeam()
     {
         ProjectId = projectId,
         AuditorId = auditorId
     };
 }
Esempio n. 2
0
        public ActionResult Add(Guid?guid)  //TODO nie można aplikować na swój projekt
        {
            if (guid == null || guid == Guid.Empty)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var auditTeam = new AuditTeam()
            {
                ProjectId = (Guid)guid,
                AuditorId = Guid.Parse(User.Identity.GetUserId())
            };

            _auditTeamRepository.Add(auditTeam);

            TempData["Message"] = "Your application was saved!";

            return(RedirectToAction("Index", "Home"));
        }
Esempio n. 3
0
        public ProjectDataMock(AuditorDataMock auditorDataMock)
        {
            // ReSharper disable once UseObjectOrCollectionInitializer
            Project = new Project()
            {
                ProjectName      = ProjectName,
                ProjectStartDate = ProjectStartDate,
                ProjectEndDate   = ProjectEndDate,
            };
            // ReSharper disable once ArrangeThisQualifier
            Project.Client = new ClientDataMock(this.Project).Client; //must be outside of Project initializer or this will be null
            var auditTeamMember = new AuditTeam()
            {
                Auditor = auditorDataMock.Auditor
            };

            Project.Auditors.Add(auditTeamMember);
            Project.Auditors.Add(auditTeamMember);
        }