public void Controller_Base_HandleQuery_ShouldBeOk()
        {
            // Action
            var callback = _apiControllerBase.HandleQuery <ApiControllerBaseDummy, ApiControllerBaseDummyViewModel>(_dummy.Object);
            //Assert
            var httpResponse = callback.Should().BeOfType <OkNegotiatedContentResult <ApiControllerBaseDummyViewModel> >().Subject;

            httpResponse.Content.Should().NotBeNull();
        }
Exemple #2
0
        public void Base_Controller_HandleQuery_ShouldBeOk()
        {
            //Arrange
            var query = new List <ApiControllerBaseDummy>()
            {
                _dummy.Object
            }.AsQueryable();
            var odataOptions = GetOdataQueryOptions <ApiControllerBaseDummy>(_apiControllerBase);
            // Action
            var callback = _apiControllerBase.HandleQuery <ApiControllerBaseDummy, ApiControllerBaseDummyQuery>(query, odataOptions);
            //Assert
            var httpResponse = callback.Should().BeOfType <OkNegotiatedContentResult <PageResult <ApiControllerBaseDummyQuery> > >().Subject;

            httpResponse.Content.Should().NotBeNull();
        }