public async Task GetStandards_EncodesSearchTerm()
        {
            // Arrange
            var searchTerm  = "test/test";
            var searchModel = new StandardSearchModel()
            {
                SearchTerm = searchTerm
            };

            var service = new StandardService(_azureServiceMock.Object, _searchCleaningServiceMock.Object);

            // Act
            var result = await service.GetStandards(searchModel);

            // Assert
            _searchCleaningServiceMock.Verify(m => m.EscapeSearchSpecialCharacters(searchTerm), Times.Once);
        }
Exemplo n.º 2
0
        public JsonResult GetStandards()
        {
            var result = standardService.GetStandards();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }