예제 #1
0
        public void Controller_Get_Should_Be_NoContentResult()
        {
            var fixture    = new DbContextFixture();
            var logger     = new Mock <ILogger <ReportRequestsController> >().Object;
            var repository = new ReportRequestRepository(fixture.context);
            var controller = new ReportRequestsController(logger, repository);
            ActionResult <IQueryable <ReportRequest> > result = controller.Get();

            result.Result.Should().BeOfType <NoContentResult>();
        }
예제 #2
0
        public void Controller_Get_ById_Should_Be_NoContentResult()
        {
            var fixture    = new DbContextFixture();
            var logger     = new Mock <ILogger <ReportRequestsController> >().Object;
            var repository = new ReportRequestRepository(fixture.context);
            var controller = new ReportRequestsController(logger, repository);
            var e          = ReportRequestEntityTypeConfiguration.ReportRequestSeed.First().Id;
            ActionResult <ReportRequest> result = controller.Get(e);

            result.Result.Should().BeOfType <NoContentResult>();
        }