Пример #1
0
        public async Task WithdrawFromAnnouncementTemplate(int userId, int joinRequestId)
        {
            AnnouncementJoinRequestSupplierTemplate joinRequest = await _joinRequestQueries.GetAnnouncementJoinRequestWithAttachmentsByRequestId(joinRequestId);

            joinRequest.Withdraw(userId, joinRequestId);
            await _joinRequestCommands.UpdateAnnouncementJoinRequestAsync(joinRequest);
        }
Пример #2
0
        public void Should_WithDraw_AnnouncementJoinRequestSupplierTemplate()
        {
            var attachments = new List <AnnouncementTemplateJoinRequestAttachment>
            {
                new AnnouncementTemplateJoinRequestAttachment("name", "123")
            };
            var announcementId = 1;
            var cr             = "123";
            var statusId       = 1;
            var announcementJoinRequestSupplierTemplate = new AnnouncementJoinRequestSupplierTemplate(attachments, announcementId, cr, statusId);

            announcementJoinRequestSupplierTemplate.Withdraw(1, 1);

            announcementJoinRequestSupplierTemplate.ShouldNotBeNull();
            announcementJoinRequestSupplierTemplate.AnnouncementId.ShouldBe(announcementId);
            announcementJoinRequestSupplierTemplate.Cr.ShouldBe(cr);
            announcementJoinRequestSupplierTemplate.StatusId.ShouldBe((int)Enums.AnnouncementTemplateJoinRequestStatus.Withdrawn);
        }