Example #1
0
        public void SetUp()
        {
            _mockOfficeRepo       = MockFactory.GetMockRepository <OfficeLocation>();
            _mockUserManager      = MockFactory.MockUserManager <ApplicationUser>();
            _mockProfileValidator = MockFactory.GetMockValidator <ProfileModel>();
            _mockRoleManager      = MockFactory.MockRoleManager <IdentityRole>();

            _accountService = new AccountService(_mockOfficeRepo.Object, _mockUserManager.Object, _mockProfileValidator.Object, _mockRoleManager.Object);
        }
Example #2
0
        public void SetUp()
        {
            _mockProductRepository     = MockFactory.GetMockRepository <Product>();
            _mockLogger                = MockFactory.GetMockLogger <IProductService>();
            _mockAuthenticationService = MockFactory.GetMockAuthenticationService();
            _mockValidator             = MockFactory.GetMockValidator <Product>();
            _mockValidatorFactory      = MockFactory.GetMockValidatorFactory(_mockValidator);

            _productService = new ProductService(_mockProductRepository.Object, _mockLogger.Object, _mockAuthenticationService.Object, _mockValidatorFactory.Object);
        }