コード例 #1
0
        public async Task ShouldGetSolidarityInvitedUnregisteredSuppliersSucess()
        {
            SolidarityUnregisteredSearchCriteria cretria = new SolidarityUnregisteredSearchCriteria();
            var result = await _sut.GetSolidarityInvitedUnregisteredSuppliers(cretria);

            Assert.NotNull(result);
        }
コード例 #2
0
        public async Task Should_GetInvitedUnregisteredSuppliers()
        {
            SolidarityUnregisteredSearchCriteria solidarityUnregisteredSearchCriteria = new SolidarityUnregisteredSearchCriteria();

            _moqSupplierQueries.Setup(s => s.GetSolidarityInvitedUnregisteredSuppliers(solidarityUnregisteredSearchCriteria))
            .Returns(() =>
            {
                return(Task.FromResult <QueryResult <SolidarityInvitedUnRegisteredSupplierModel> >(new OfferDefaults().GetSolidarityInvitedUnRegisteredSupplierModelQueryResult()));
            });

            var result = await _sut.GetInvitedUnregisteredSuppliers(solidarityUnregisteredSearchCriteria);

            Assert.NotNull(result);
        }
コード例 #3
0
 public async Task <QueryResult <SolidarityInvitedUnRegisteredSupplierModel> > GetSolidarityInvitedUnregisteredSuppliers(SolidarityUnregisteredSearchCriteria cretria)
 {
     return(await _context.OfferSolidarities.Include(s => s.Offer).ThenInclude(d => d.Supplier)
            .Where(x => x.OfferId == Util.Decrypt(cretria.offerIdString) &&
                   x.IsActive == true && x.SolidarityTypeId != (int)Enums.UnRegisteredSuppliersInvitationType.SolidarityLeader && x.SolidarityTypeId != (int)Enums.UnRegisteredSuppliersInvitationType.Existed)
            .Select(i => new SolidarityInvitedUnRegisteredSupplierModel()
     {
         SolidarityIdString = Util.Encrypt(i.Id),
         Mobile = i.Mobile,
         Email = i.Email,
         CR = i.CRNumber,
         CrName = i.Supplier.SelectedCrName,
         StatusId = i.StatusId,
         StatusName = i.SolidarityStatus.Name,
         OfferIdString = Util.Encrypt(i.OfferId)
     }).ToQueryResult(cretria.PageNumber, cretria.PageSize));
 }
コード例 #4
0
ファイル: SupplierService.cs プロジェクト: lulzzz/UITest-POC
        public async Task <QueryResult <SolidarityInvitedUnRegisteredSupplierModel> > GetInvitedUnregisteredSuppliers(SolidarityUnregisteredSearchCriteria cretria)
        {
            var suppliers = await _supplierQueries.GetSolidarityInvitedUnregisteredSuppliers(cretria);

            return(suppliers);
        }