Esempio n. 1
0
        public async Task GetAnnouncementTemplateListDetail_Returns_Data()
        {
            var _expectedResult = new AnnouncementTemplateListDetailsModel()
            {
                UsingListCount           = 0,
                AcceptedSuppliersCount   = 2,
                JoinRequestCount         = 4,
                UsingListCountInternally = 0
            };

            var result = await _announcementController.GetAnnouncementTemplateListDetail(1);

            Assert.NotNull(result);
            Assert.IsType <AnnouncementTemplateListDetailsModel>(result);
            Assert.Equal(_expectedResult.UsingListCount, result.UsingListCount);
            Assert.Equal(_expectedResult.AcceptedSuppliersCount, result.AcceptedSuppliersCount);
            Assert.Equal(_expectedResult.JoinRequestCount, result.JoinRequestCount);
            Assert.Equal(_expectedResult.UsingListCountInternally, result.UsingListCountInternally);
        }
        public async Task <AnnouncementTemplateListDetailsModel> GetAnnouncementTemplateListDetail(int Id)
        {
            AnnouncementTemplateListDetailsModel detailsModel = await _announcementSupplierTemplateAppService.GetAnnouncementTemplateListDetailsByAnnouncementId(Id);

            return(detailsModel);
        }