Наследование: GrassrootsControllerBase
Пример #1
0
        private AccountController GetAccountController()
        {
            var fakeOrganizationRepository = new FakeOrganizationRepository();
            userProfileRepository = new FakeUserProfileRepository();
            campaignDonorRepository = new FakeCampaignDonorRepository();

            mocks = new MockRepository();
            var fakeEmailService = mocks.DynamicMock<IAccountMailer>();
            MailerBase.IsTestModeEnabled = true;
            AccountController c = new AccountController(userProfileRepository, fakeEmailService, campaignDonorRepository)
                                               {
                                                   FormsService = new MockFormsAuthenticationService(),
                                                   MembershipService = new MockMembershipService(),
                                                   OrganizationRepository = fakeOrganizationRepository
                                               };

            TestHelpers.MockHttpContext(c, mocks, postFiles: false);
            return c;
        }
Пример #2
0
 public void SetUp()
 {
     userProfile = null;
     controller = GetAccountController();
 }