public HomeController(ProjectsController projects,SprintsController sprints,IssuesController issues,CommentsController comments, AttachmentsController attachments, UsersController users) { this.projects = projects; this.sprints = sprints; this.issues = issues; this.comments = comments; this.attachments = attachments; this.users = users; }
public void Setup() { _stubFileDto = new FileDto { Id = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a1"), ItemId = Guid.Parse("5eb09b45-9c70-4465-b62d-535e28b16aed"), Name = "Stub file", Size = 25424, Status = Models.ViewModels.FileStatus.Uploading, Type = "Image/PNG", UploadedBy = "Stub test", UploadedOn = DateTime.Now, UploaderId = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a1"), }; _stubFiles = new UploadFilesVm { Files = new System.Collections.Generic.List <FileMetadataVm> { new FileMetadataVm { Name = "Stub file metadata", Size = 1000, Type = "Image/PNG" } }, ItemId = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a2"), UploadedBy = "Stub tester", UploaderId = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a3"), }; _stubStatusUpdate = new UpdateStatusVm { Id = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a1"), Status = FileStatus.Uploaded, }; _stubAttachmentList = new List <AttachmentVm> { new AttachmentVm { Id = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a3"), Name = "Stub attachment", Size = 100, Status = FileStatus.Failed, UploadedBy = "Stub tester", UploaderId = Guid.Parse("aada6f2a-8854-4a5e-a907-2244f43408a3"), UploadedOn = DateTime.Now } }; _mockAttachmentsRepository = new Mock <IAttachmentsRepository>(); _attachmentsController = new AttachmentsController(_mockAttachmentsRepository.Object); }