public void When_Passing_No_Query_Or_Json_Then_Empty_Search_Parameter_Is_Returned()
        {
            // ARRANGE
            InitializeFakeObjects();

            // ACTS & ASSERTS
            Assert.NotNull(_searchParameterParser.ParseQuery(null));
            Assert.NotNull(_searchParameterParser.ParseJson(null));
        }
Example #2
0
        public async Task <ActionResult> Search()
        {
            var searchParameter = _searchParameterParser.ParseQuery(Request.Query);
            var result          = await _repository.Search(searchParameter);

            var content = result.ToDto(searchParameter);

            return(new OkObjectResult(content));
        }
Example #3
0
        public Task <ApiActionResult> SearchUsers(IQueryCollection query, string locationPattern)
        {
            var searchParam = _searchParameterParser.ParseQuery(query);

            return(_getRepresentationsAction.Execute(Common.Constants.ResourceTypes.User, searchParam, locationPattern));
        }
        public Task <ApiActionResult> GetGroup(string id, string locationPattern, IQueryCollection query)
        {
            var searchParameter = _searchParameterParser.ParseQuery(query);

            return(_getRepresentationAction.Execute(id, locationPattern, Common.Constants.SchemaUrns.Group));
        }