Beispiel #1
0
        public void Base_Controller_HandleQuery_ShouldBeOk()
        {
            //Arrange
            var odataOptions = GetOdataQueryOptions <ApiControllerBaseDummy>(_apiControllerBase);
            // Action
            var callback = _apiControllerBase.HandleQuery <ApiControllerBaseDummy, ApiControllerBaseDummyViewModel>(_dummy.Object);
            //Assert
            var httpResponse = callback.Should().BeOfType <OkNegotiatedContentResult <ApiControllerBaseDummyViewModel> >().Subject;

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

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