Ejemplo n.º 1
0
        public FollowingControllerTests()
        {
            var mockUoW = new Mock <IUnitOfWork>();

            _controller = new FollowingsController(mockUoW.Object);
            _controller.MockCurrentUser("fd0a36e6-563f-4729-a01e-c679112fab97", "*****@*****.**");
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            _mockFollowingsRepository = new Mock <IFollowingRepository>();

            _mockUnitOfWork = new Mock <IUnitOfWork>();
            _mockUnitOfWork.SetupGet(u => u.Followings).Returns(_mockFollowingsRepository.Object);

            _controller = new FollowingsController(_mockUnitOfWork.Object);
            _controller.MockCurrentUser(_UserId, _UserName);
        }
        public void TestInitialize()
        {
            _mockRepository = new Mock <IFollowingRepository>();
            var mockUow = new Mock <IUnitOfWork>();

            mockUow.SetupGet(u => u.Followings).Returns(_mockRepository.Object);

            _controller = new FollowingsController(mockUow.Object);
            _userId     = "1";
            _controller.MockCurrentUser(_userId, "*****@*****.**");
        }
Ejemplo n.º 4
0
        public void TestInitialize()
        {
            _userId = "1";

            var mockUoW = new Mock <IUnitOfWork>();

            _mockRepo = new Mock <IFollowingRepo>();
            mockUoW.SetupGet(r => r.Followings).Returns(_mockRepo.Object);

            _controller = new FollowingsController(mockUoW.Object);
            _controller.MockCurrentUser(_userId, "*****@*****.**");
        }
        public void TestInitialize()
        {
            _repository = new Mock <IFollowingRepository>();

            var mockUoW = new Mock <IUnitOfWork>();

            mockUoW.SetupGet(m => m.Followings).Returns(_repository.Object);

            _controller = new FollowingsController(mockUoW.Object);

            _userId = "1";
            _controller.MockCurrentUser(_userId, "*****@*****.**");
        }
        public void TestInitialize()
        {
            _mockRepository = new Mock <IFollowingRepository>();

            var mockUoW = new Mock <IUnityOfWork>();

            mockUoW.SetupGet(u => u.Followings).Returns(_mockRepository.Object);

            var appUser = new MockApplicationUser();

            _controller = new FollowingsController(appUser.TestUserManager <ApplicationUser>(), mockUoW.Object);
            _userId     = "1";
            _controller.MockCurrentUser(_userId, "*****@*****.**");
        }