コード例 #1
0
        public async Task ActiveUsers_ReturnsViewResult()
        {
            //Arrange
            var controller = new AdminController(_adminMock.Object, _userMock.Object, _loginMock.Object,
                                                 _userInfoMock.Object, _userManagerMock.Object,
                                                 _transfersReportsMock.Object, _countersReportMock.Object, _filtersReportMock.Object);

            _adminMock.Setup(repo => repo.GetActiveUsersList(""))
            .ReturnsAsync(new List <User>()
            {
                new User
                {
                }
            });
            //Act
            var result = await controller.ActiveUsers("", 1);

            //Assert
            Assert.IsType <ViewResult>(result);
        }