Ejemplo n.º 1
0
        public async Task GetAllEnquiryRepliesByTenderId_Returns_Data()
        {
            var _userId = "1";

            _claims = new Claim[1] {
                new Claim(IdentityConfigs.Claims.NameIdentifier, _userId)
            };
            _enquiryController = _enquiryController.WithIdentity(_claims);

            var _tenderId = 18;

            var result = await _enquiryController.GetAllEnquiryRepliesByTenderId(_tenderId);

            Assert.NotNull(result);
            Assert.IsType <List <EnquiryModel> >(result);
            Assert.NotEmpty(result);
        }
Ejemplo n.º 2
0
        public async Task GetAllEnquiryRepliesByTenderId_BySearchCriteria_Returns_Data()
        {
            var _userId = "1";

            _claims = new Claim[1] {
                new Claim(IdentityConfigs.Claims.NameIdentifier, _userId)
            };
            _enquiryController = _enquiryController.WithIdentity(_claims);

            var _simpleSearchCretriaModel = new SimpleSearchCretriaModel()
            {
                TenderId = 18
            };

            var result = await _enquiryController.GetAllEnquiryRepliesByTenderId(_simpleSearchCretriaModel);

            Assert.NotNull(result);
            Assert.IsType <QueryResult <EnquiryModel> >(result);
            Assert.NotEmpty(result.Items);
            Assert.True(result.PageSize > 0);
            Assert.True(result.PageNumber > 0);
            Assert.True(result.TotalCount > 0);
        }