public void SetUp()
        {
            _unitOfWorkFactory = new FakeUnitOfWorkFactory();
            _authorizationUtil = Substitute.For <IAuthorizationUtil>();

            _service = new MonsterTemplateService(_unitOfWorkFactory, _authorizationUtil);
        }
Пример #2
0
        public void SetUp()
        {
            _unitOfWorkFactory          = new FakeUnitOfWorkFactory();
            _itemFactory                = Substitute.For <IItemFactory>();
            _notificationSessionFactory = new FakeNotificationSessionFactory();
            _authorizationUtil          = Substitute.For <IAuthorizationUtil>();
            _itemUtil             = Substitute.For <IItemUtil>();
            _characterHistoryUtil = Substitute.For <ICharacterHistoryUtil>();
            _jsonUtil             = Substitute.For <IJsonUtil>();
            _itemTemplateUtil     = Substitute.For <IItemTemplateUtil>();
            _actionsUtil          = Substitute.For <IActionsUtil>();
            _rngUtil      = Substitute.For <IRngUtil>();
            _itemDataUtil = Substitute.For <IItemDataUtil>();

            _service = new ItemService(
                _unitOfWorkFactory,
                _itemFactory,
                _notificationSessionFactory,
                _authorizationUtil,
                _itemUtil,
                _characterHistoryUtil,
                _jsonUtil,
                _rngUtil,
                _itemTemplateUtil,
                _actionsUtil,
                _itemDataUtil
                );
        }
        public void SetUp()
        {
            _unitOfWorkFactory    = new FakeUnitOfWorkFactory();
            _characterFactory     = Substitute.For <ICharacterFactory>();
            _itemService          = Substitute.For <IItemService>();
            _authorizationUtil    = Substitute.For <IAuthorizationUtil>();
            _characterHistoryUtil = Substitute.For <ICharacterHistoryUtil>();
            _mapper = Substitute.For <IMapper>();
            _characterModifierUtil      = Substitute.For <ICharacterModifierUtil>();
            _notificationSessionFactory = new FakeNotificationSessionFactory();
            _characterUtil = Substitute.For <ICharacterUtil>();
            _itemUtil      = Substitute.For <IItemUtil>();

            _service = new CharacterService(
                _unitOfWorkFactory,
                _characterFactory,
                _itemService,
                _authorizationUtil,
                _characterHistoryUtil,
                _mapper,
                _characterModifierUtil,
                _notificationSessionFactory,
                _characterUtil,
                _itemUtil
                );
        }
Пример #4
0
        public void Setup()
        {
            _unitOfWorkFactory = new FakeUnitOfWorkFactory();
            FakeAccountRepository accountRepository = new FakeAccountRepository(_unitOfWorkFactory);

            _authenticationData = new FakeAuthenticationData();
            _accountLogic       = new AccountLogic(_authenticationData, _unitOfWorkFactory, accountRepository);
            CreateTestData();
        }
Пример #5
0
        public void Setup()
        {
            _inintializer = new OAuthInintializer();
            FakeUnitOfWorkFactory      unitOfWorkFactory         = new FakeUnitOfWorkFactory();
            IUserRepository            userRepository            = new FakeUserRepository(unitOfWorkFactory);
            IOAuthMembershipRepository oAuthMembershipRepository = new FakeOAuthMembershipRepository(unitOfWorkFactory);

            _oAuthService = new OAuthService(unitOfWorkFactory, userRepository, oAuthMembershipRepository);
        }
        public void Setup()
        {
            _unitOfWorkFactory = new FakeUnitOfWorkFactory();
            IUserRepository       userRepository       = new FakeUserRepository(_unitOfWorkFactory);
            IMembershipRepository membershipRepository = new FakeMembershipRepository(_unitOfWorkFactory);

            _userRegistrationService =
                new UserRegistrationService(userRepository, membershipRepository, _unitOfWorkFactory);
            CreateTestData();
        }
        public WeatherServiceUnitTests()
        {
            _fakeCityRepository    = new FakeRepository <CityName>();
            _fakeHistoryRepository = new FakeRepository <HistoryWeatherDataObject>();

            _fakeUnitOfWorkFactory = new FakeUnitOfWorkFactory(
                uow =>
            {
                uow.SetRepository(_fakeCityRepository);
                uow.SetRepository(_fakeHistoryRepository);
            });
        }
Пример #8
0
        public void Setup()
        {
            _unitOfWorkFactory = new FakeUnitOfWorkFactory();
            FakeNewsRepository     newsRepository     = new FakeNewsRepository(_unitOfWorkFactory);
            FakeNewsTextRepository newsTextRepository = new FakeNewsTextRepository(_unitOfWorkFactory);

            _authenticationData = new FakeAuthenticationData();
            _authenticationData.IsAuthenticated = true;
            _authenticationData.IsAdministrator = false;
            _newsLogic = new NewsLogic(newsRepository, newsTextRepository, _unitOfWorkFactory, _authenticationData);
            CreateTestData();
        }
        public void SetUp()
        {
            _unitOfWorkFactory = new FakeUnitOfWorkFactory();
            _authorizationUtil = Substitute.For <IAuthorizationUtil>();
            _itemTemplateUtil  = Substitute.For <IItemTemplateUtil>();

            _service = new ItemTemplateSectionService(
                _unitOfWorkFactory,
                _authorizationUtil,
                _itemTemplateUtil
                );
        }
Пример #10
0
        public void SetUp()
        {
            _unitOfWorkFactory          = new FakeUnitOfWorkFactory();
            _authorizationUtil          = Substitute.For <IAuthorizationUtil>();
            _notificationSessionFactory = Substitute.For <INotificationSessionFactory>();
            _itemService = Substitute.For <IItemService>();

            _service = new LootService(
                _unitOfWorkFactory,
                _authorizationUtil,
                _notificationSessionFactory,
                _itemService
                );
        }
Пример #11
0
        public void SetUp()
        {
            _unitOfWorkFactory      = new FakeUnitOfWorkFactory();
            _mailService            = Substitute.For <IMailService>();
            _passwordHashingService = Substitute.For <IPasswordHashingService>();
            _authorizationUtil      = Substitute.For <IAuthorizationUtil>();

            _service = new UserService(
                _unitOfWorkFactory,
                _passwordHashingService,
                _mailService,
                _authorizationUtil
                );
        }
Пример #12
0
        public void Setup()
        {
            _unitOfWorkFactory = new FakeUnitOfWorkFactory();
            IUserRepository       userRepository       = new FakeUserRepository(_unitOfWorkFactory);
            IMembershipRepository membershipRepository = new FakeMembershipRepository(_unitOfWorkFactory);

            _userRegistrationService =
                new UserRegistrationService(userRepository, membershipRepository, _unitOfWorkFactory);
            _authenticationService = new AuthenticationService(_unitOfWorkFactory, membershipRepository);
            HttpContext.Current    = new HttpContext(
                new HttpRequest("", "http://localhost", ""),
                new HttpResponse(new StringWriter()));
            CreateTestData();
        }
Пример #13
0
 public void SetUp()
 {
     _unitOfWorkFactory = new FakeUnitOfWorkFactory();
     _authorizationUtil = Substitute.For <IAuthorizationUtil>();
     _mapper            = Substitute.For <IMapper>();
     _itemTemplateUtil  = Substitute.For <IItemTemplateUtil>();
     _stringCleanupUtil = Substitute.For <IStringCleanupUtil>();
     _service           = new ItemTemplateService(
         _unitOfWorkFactory,
         _authorizationUtil,
         _mapper,
         _itemTemplateUtil,
         _stringCleanupUtil
         );
 }
Пример #14
0
        public void SetUp()
        {
            _unitOfWorkFactory          = new FakeUnitOfWorkFactory();
            _authorizationUtil          = Substitute.For <IAuthorizationUtil>();
            _activeStatsModifierUtil    = Substitute.For <IActiveStatsModifierUtil>();
            _notificationSessionFactory = new FakeNotificationSessionFactory();
            _jsonUtil    = Substitute.For <IJsonUtil>();
            _timeService = Substitute.For <ITimeService>();
            _itemService = Substitute.For <IItemService>();

            _service = new MonsterService(
                _unitOfWorkFactory,
                _authorizationUtil,
                _activeStatsModifierUtil,
                _notificationSessionFactory,
                _jsonUtil,
                _timeService,
                _itemService
                );
        }
Пример #15
0
        public void SetUp()
        {
            _unitOfWorkFactory          = new FakeUnitOfWorkFactory();
            _authorizationUtil          = Substitute.For <IAuthorizationUtil>();
            _notificationSessionFactory = new FakeNotificationSessionFactory();
            _mapper           = Substitute.For <IMapper>();
            _groupUtil        = Substitute.For <IGroupUtil>();
            _durationUtil     = Substitute.For <IDurationUtil>();
            _groupHistoryUtil = Substitute.For <IGroupHistoryUtil>();
            _groupConfigUtil  = Substitute.For <IGroupConfigUtil>();

            _service = new GroupService(
                _unitOfWorkFactory,
                _authorizationUtil,
                _notificationSessionFactory,
                _mapper,
                _durationUtil,
                _groupUtil,
                _groupHistoryUtil,
                _groupConfigUtil
                );
        }
        public void SetUp()
        {
            _fakeUnitOfWorkFactory = new FakeUnitOfWorkFactory();

            _service = new SocialMediaUserLinkService(_fakeUnitOfWorkFactory);
        }