コード例 #1
0
        public UserServiceTests(AutoMapperFixture mapperFixture)
        {
            _mockStore = Mock.Create <IUserStore <ApplicationUser> >();
            _mockStore.As <IUserPasswordStore <ApplicationUser> >();
            _mockStore.As <IQueryableUserStore <ApplicationUser> >();
            _mockStore.As <IUserRoleStore <ApplicationUser> >();
            _mockStore.As <IUserClaimStore <ApplicationUser> >();

            _applicationUserManagerMock = Mock.Create <ApplicationUserManager>();
            _mockRoleService            = Mock.Create <IRoleService>();
            _mockPhoneRepository        = Mock.Create <IUserPhoneRepository>();
            _mapperFixture = mapperFixture;

            // Cannot moq the interface directly, consider creating a facade around the manager class
            _userManager = new ApplicationUserManager(_mockStore.Object);
            _userService = new UserService(_userManager, _mapperFixture.MapperInstance, _mockRoleService.Object, _mockPhoneRepository.Object);
        }
コード例 #2
0
 public AutoMapperValidationTests(AutoMapperFixture mappingFixture)
 {
     _mappingFixture = mappingFixture;
 }
コード例 #3
0
 public ProductRepositoryTest(ContextFixture contextFixture, AutoMapperFixture autoMapperFixture)
     : base(contextFixture, autoMapperFixture)
 {
 }
コード例 #4
0
 public BaseRepositoryTest(ContextFixture contextFixture, AutoMapperFixture autoMapperFixture)
 {
     ContextFixture = contextFixture;
     MapperFixture  = autoMapperFixture;
 }
コード例 #5
0
 public AuditServiceTests(AutoMapperFixture mapperFixture)
 {
     _mockAuditRepository = Mock.Create <IActivityAuditRepository>();
     _auditService        = new AuditService(_mockAuditRepository.Object, mapperFixture.MapperInstance);
 }
コード例 #6
0
 public UserProfileTests(AutoMapperFixture mappingFixture)
 {
     _mappingFixture = mappingFixture;
 }
コード例 #7
0
 public ActivityAuditProfileTests(AutoMapperFixture mappingFixture)
 {
     _mappingFixture = mappingFixture;
 }
コード例 #8
0
 public ProgramsControllerTest(AutoMapperFixture fixture) : base(fixture)
 {
     SetupMocks();
 }
コード例 #9
0
 public AuthorProfileTest(AuthorFixtures authorFixtures, AutoMapperFixture autoMapperFixture)
 {
     _authorFixtures = authorFixtures;
     _mapper         = autoMapperFixture;
 }
コード例 #10
0
 public BookProfileTest(BookFixtures bookFixtures, AutoMapperFixture autoMapperFixture)
 {
     _bookFixtures = bookFixtures;
     _mapper       = autoMapperFixture;
 }
コード例 #11
0
 public CategoryControllerTests(AutoMapperFixture fixture) : base(fixture)
 {
 }
コード例 #12
0
 public PublisherProfileTest(PublisherFixtures publisherFixtures,
                             AutoMapperFixture autoMapperFixture)
 {
     _publisherFixtures = publisherFixtures;
     _mapper            = autoMapperFixture;
 }
コード例 #13
0
 public PerformersControllerTest(AutoMapperFixture fixture) : base(fixture)
 {
     SetupMocks();
 }
コード例 #14
0
 public ProductControllerTests(AutoMapperFixture fixture) : base(fixture)
 {
 }
コード例 #15
0
 public ClaimProfileTests(AutoMapperFixture mappingFixture)
 {
     _mappingFixture = mappingFixture;
 }