コード例 #1
0
        private void SetupController()
        {
            _controller = new TopicFollowingController(_unitOfWork.Object);
            _user       = new Mock <IPrincipal>();

            _controller.User = _user.Object;
            _identity        = _user.MockIdentity(_following.UserId);
        }
コード例 #2
0
        public void Setup()
        {
            _context    = new iKnowContext();
            _controller = new TopicFollowingController(new UnitOfWork(_context));

            _currentUser     = new Mock <IPrincipal>();
            _controller.User = _currentUser.Object;
            _firstUserInDb   = _context.Users.First();
            _currentUser.MockIdentity(_firstUserInDb.Id);
        }