Пример #1
0
        public void IndexReturnsView()
        {
            //act
            ViewResult result = controller.Index() as ViewResult;

            //assert
            Assert.AreEqual("Index", result.ViewName);
        }
        public void IndexViewLoads()
        {
            //act
            ViewResult result = (ViewResult)controller.Index();

            //assert
            Assert.AreEqual("Index", result.ViewName);
        }
        public void IndexViewLoads()
        {
            // act
            ViewResult actual = (ViewResult)controller.Index(100);

            // assert
            Assert.AreEqual("Index", actual.ViewName);
        }
Пример #4
0
        public void RegionReturnsIndexView()
        {
            //Arrage

            //Act
            var result = _regionsControllerTest.Index("");


            //Assert
            Assert.IsNotNull(result);
        }
Пример #5
0
        public async Task Get_AllRegions_ReturnsAllregionsOkResult()
        {
            // Arrange
            _regionService.Setup(x => x.GetAllRegionsAsync()).ReturnsAsync(GetRegions());
            // Act
            var result = await _regionController.Index();

            // Assert
            Assert.IsInstanceOf <OkObjectResult>(result);
            Assert.IsInstanceOf <List <RegionDTO> >((result as ObjectResult).Value);
        }
Пример #6
0
        public void IndexViewLoads()
        {
            ViewResult result = controller.Index() as ViewResult;

            Assert.AreEqual("Index", result.ViewName);
        }