コード例 #1
0
        public void Controller_Get_Should_Be_NoContentResult()
        {
            var fixture    = new DbContextFixture();
            var logger     = new Mock <ILogger <ReportStatesController> >().Object;
            var repository = new ReportStateRepository(fixture.context);
            var controller = new ReportStatesController(logger, repository);
            ActionResult <IQueryable <ReportState> > 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 <ReportStatesController> >().Object;
            var repository = new ReportStateRepository(fixture.context);
            var controller = new ReportStatesController(logger, repository);
            var e          = ReportStateEntityTypeConfiguration.ReportStateSeed.First().Id;
            ActionResult <ReportState> result = controller.Get(e);

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