Exemple #1
0
        public EFCore_Context_vs_Controller()
        {
            _context = new VrsContext();

            _controllerLobs = new LobsController(_lobsService);
            _lobsService    = new LOBsService(_lobsRepository);
        }
Exemple #2
0
 public B1_TestYourControllerHere_LOB()
 {
     _context        = new VrsContext();
     _controllerLobs = new LobsController(_lobsService);
     _lobsRepository = new LOBsRepository(_context);
     _lobsService    = new LOBsService(_lobsRepository);
 }
Exemple #3
0
        public async Task LobsController_AreYouWorking()
        {
            //Arrange
            var controller = new LobsController(_lobsService);

            // Act
            var actionResult = await controller.All();

            // Assert
            Assert.NotNull(actionResult);
        }
Exemple #4
0
        public async Task LobsController_TotalCount()
        {
            //Arrange
            var controller = new LobsController(_lobsService);

            int expectedCount = LOBS_TOTALCOUNT;

            // Act
            var _listLobs = await controller.All();

            // Assert
            Assert.Equal(_listLobs.Count(), expectedCount);
        }
Exemple #5
0
        public async Task LobsController_GetById_28()
        {
            //Arrange
            string expectedTitle = "Visionstream NZ";
            int    ID            = 28;

            var controller = new LobsController(_lobsService);

            // Act
            IActionResult actionResult = await controller.GetById(ID);

            // Assert
            Assert.NotNull(actionResult);

            OkObjectResult result = actionResult as OkObjectResult;

            Assert.NotNull(result);

            var _Lob = result.Value as tblLOBs;

            Assert.Equal(expectedTitle, _Lob.LOB);
        }