public void Subscribe_Returns() { Mapper.CreateMap <List <Journal>, List <SubscriptionViewModel> >(); //Arrange var membershipRepository = Mock.Create <IStaticMembershipService>(); var userMock = Mock.Create <MembershipUser>(); Mock.Arrange(() => userMock.ProviderUserKey).Returns(1); Mock.Arrange(() => membershipRepository.GetUser()).Returns(userMock); var mockJournalRepository = Mock.Create <IJournalRepository>(); var mockSubscriptionRepository = Mock.Create <ISubscriptionRepository>(); Mock.Arrange(() => mockSubscriptionRepository.AddSubscription(1, 1)).IgnoreArguments().Returns( new OperationStatus() { Status = true }).MustBeCalled(); //Act SubscriberController controller = new SubscriberController(mockJournalRepository, mockSubscriptionRepository, membershipRepository); ActionResult actionResult = (ActionResult)controller.Subscribe(1); //Assert Assert.IsNotNull(actionResult); }