Esempio n. 1
0
 protected override void Establish_context()
 {
     base.Establish_context();
     var randomNumberGenerator = new Random();
     _itemTypeId = randomNumberGenerator.Next(32000);
     _itemTypeRepository = new ItemTypeRepository();
 }
        public MapFileRepository(IItemTypeRepository itemTypeRepository)
        {
            if (itemTypeRepository == null)
                throw new ArgumentNullException("itemTypeRepository");

            this._itemTypeRepository = itemTypeRepository;
        }
Esempio n. 3
0
 public ItemMapper(
     ISkillRepository skillRepository,
     IItemSetRepository itemSetRepository,
     IItemTypeRepository itemTypeRepository,
     IRarityRepository rarityRepository,
     IEffectRepository effectRepository,
     ICurrencyRepository currencyRepository,
     IBehaviourRepository behaviourRepository,
     IItemModifierRepository itemModifierRepository,
     ISkinRepository skinRepository,
     AttributeModifierFactory attributeModifierFactory,
     PropertyModifierFactory propertyModifierFactory)
 {
     this.skillRepository          = skillRepository;
     this.itemSetRepository        = itemSetRepository;
     this.itemTypeRepository       = itemTypeRepository;
     this.rarityRepository         = rarityRepository;
     this.effectRepository         = effectRepository;
     this.currencyRepository       = currencyRepository;
     this.behaviourRepository      = behaviourRepository;
     this.itemModifierRepository   = itemModifierRepository;
     this.skinRepository           = skinRepository;
     this.attributeModifierFactory = attributeModifierFactory;
     this.propertyModifierFactory  = propertyModifierFactory;
 }
        protected override void Establish_context()
        {
            base.Establish_context();

            _kernel             = new StandardKernel(new IntegrationTestModule());
            _itemTypeRepository = _kernel.Get <IItemTypeRepository>();
        }
Esempio n. 5
0
        public CommonMapper(ICountryRepository countryRepository, IItemTypeRepository itemTypeRepository)
        {
            MapperConfiguration config = GetConfiguration();

            mapper = config.CreateMapper();
            this.countryRepository  = countryRepository;
            this.itemTypeRepository = itemTypeRepository;
        }
 public LocationController(IItemTypeRepository itemrepository, IUserRepository userRepository, IRoleRepository roleRepository, ILocationRepository locationRepository, IDepartmentRepository departmentRepository)
 {
     _itemtypeRepository   = itemrepository;
     _userRepository       = userRepository;
     _roleRepository       = roleRepository;
     _locationRepository   = locationRepository;
     _departmentRepository = departmentRepository;
 }
Esempio n. 7
0
 public LinkedItemOfTypeInStatusPreCondition(Item item,
                                             IItemTypeRepository itemTypeRepository,
                                             IWorkflowNodeRepository workflowNodeRepository)
 {
     _item = item;
     _itemTypeRepository     = itemTypeRepository;
     _workflowNodeRepository = workflowNodeRepository;
 }
Esempio n. 8
0
 public EventsController(IItemTypeRepository itemTypeRepository,
                         IItemRepository itemRepository,
                         ICouponRepository couponRepository)
 {
     _itemTypeRepository = itemTypeRepository;
     _itemRepository     = itemRepository;
     _couponRepository   = couponRepository;
 }
        protected override void Establish_context()
        {
            base.Establish_context();
            _sessionFactory = new Mock<ISessionFactory>();
            _session = new Mock<ISession>();

            _sessionFactory.Setup(sf => sf.OpenSession()).Returns(_session.Object);
            _itemTypeRepository = new ItemTypeRepository(_sessionFactory.Object);
        }
Esempio n. 10
0
        public ItemTypeController(IItemTypeRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.ItemTypeRepository = repository;
        }
 public ImportController(IRegionRepository regionRepository, ICountryRepository countryRepository,
                         IItemTypeRepository itemTypeRepository, ISaleRepository saleRepository, ILogger <ImportController> logger)
 {
     this.regionRepository   = regionRepository;
     this.countryRepository  = countryRepository;
     this.itemTypeRepository = itemTypeRepository;
     this.saleRepository     = saleRepository;
     this.logger             = logger;
 }
        public ItemTypeController(IItemTypeRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.ItemTypeRepository = repository;
        }
 public ItemsController(IItemRepository itemRepository, IMappingEngine mappingEngine,
     IItemTypeRepository itemTypeRepository)
 {
     if (itemRepository == null) throw new ArgumentNullException("itemRepository");
     if (mappingEngine == null) throw new ArgumentNullException("mappingEngine");
     if (itemTypeRepository == null) throw new ArgumentNullException("itemTypeRepository");
     _itemRepository = itemRepository;
     _mappingEngine = mappingEngine;
     _itemTypeRepository = itemTypeRepository;
 }
Esempio n. 14
0
        protected override void Establish_context()
        {
            base.Establish_context();
            _sessionFactory = new Mock<ISessionFactory>();
            _session = new Mock<ISession>();

            _sessionFactory.Setup(sf => sf.OpenSession()).Returns(_session.Object);

            _itemTypeRepository = new ItemTypeRepository(_sessionFactory.Object);
        }
Esempio n. 15
0
 public SalesController(ISaleRepository orderRepository, IRegionRepository regionRepository,
                        ICountryRepository countryRepository, IItemTypeRepository itemTypeRepository, ICommonMapper mapper,
                        ILogger <SalesController> logger)
 {
     saleRepository          = orderRepository;
     this.regionRepository   = regionRepository;
     this.countryRepository  = countryRepository;
     this.itemTypeRepository = itemTypeRepository;
     Mapper      = mapper;
     this.logger = logger;
 }
Esempio n. 16
0
        protected override void Establish_context()
        {
            base.Establish_context();

            _sessionFactory = Substitute.For <ISessionFactory>();
            _session        = Substitute.For <ISession>();

            _sessionFactory.OpenSession().Returns(_session);

            _itemTypeRepository = new ItemTypeRepository(_sessionFactory);
        }
 public FunctionRegistry(
     IItemRepository itemRepository,
     IItemTypeRepository itemTypeRepository,
     IFieldRepository fieldRepository,
     IWorkflowNodeRepository workflowNodeRepository)
 {
     _itemRepository         = itemRepository;
     _itemTypeRepository     = itemTypeRepository;
     _fieldRepository        = fieldRepository;
     _workflowNodeRepository = workflowNodeRepository;
 }
Esempio n. 18
0
        protected override void Establish_context()
        {
            base.Establish_context();

            _sessionFactory = new Mock <ISessionFactory>();
            _session        = new Mock <ISession>();

            //  The mock that will stand in for 'sessionFactory' will return the mock created for 'session' when the 'OpenSession' method on the 'sessionFactory' is called.
            _sessionFactory.Setup(sf => sf.OpenSession()).Returns(_session.Object);

            _itemTypeRepository = new ItemTypeRepository(_sessionFactory.Object);
        }
Esempio n. 19
0
        public ItemTypeController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.ItemTypeRepository = new MixERP.Net.Schemas.Core.Data.ItemType
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
        public ItemTypeController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.ItemTypeRepository = new MixERP.Net.Schemas.Core.Data.ItemType
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
Esempio n. 21
0
        protected override void Establish_context()
        {
            base.Establish_context();

            _kernel = new StandardKernel(new IntegrationTestModule());
            try
            {
                _itemTypeRepository = _kernel.Get <IItemTypeRepository>();
            }
            catch (Exception e)
            {
                return;
            }
            return;
        }
Esempio n. 22
0
 public WorkflowTransitionsController(
     IWorkflowTransitionRepository workflowTransitionRepository,
     //IFunctionRegistry functionRegistry,
     IItemRepository itemRepository,
     IItemTypeRepository itemTypeRepository,
     IWorkflowNodeRepository workflowNodeRepository,
     IFieldRepository fieldRepository)
 {
     _workflowTransitionRepository = workflowTransitionRepository;
     //_functionRegistry = functionRegistry;
     _itemRepository         = itemRepository;
     _itemTypeRepository     = itemTypeRepository;
     _workflowNodeRepository = workflowNodeRepository;
     _fieldRepository        = fieldRepository;
 }
Esempio n. 23
0
        protected override void Establish_context()
        {
            base.Establish_context();

            _kernel = new StandardKernel(new IntegrationTestModule());
            try
            {
                _itemTypeRepository = _kernel.Get<IItemTypeRepository>();
            }
            catch (Exception e)
            {
                return;
            }
            return;
        }
Esempio n. 24
0
 public SeedManager(ILogger <SeedManager> logger,
                    IUnitOfWork unitOfWork,
                    IItemTypeRepository itemTypeRepository,
                    IPaymentMethodRepository paymentMethodRepository,
                    ICountryRepository countryRepository,
                    RoleManager <IdentityRole> roleManager,
                    UserManager <AppUser> userManager)
 {
     _logger                  = logger;
     _unitOfWork              = unitOfWork;
     _itemTypeRepository      = itemTypeRepository;
     _paymentMethodRepository = paymentMethodRepository;
     _roleManager             = roleManager;
     _userManager             = userManager;
     _countryRepository       = countryRepository;
 }
Esempio n. 25
0
 public ItemRepository(IOptions <Settings> settings,
                       IItemTypeRepository itemTypeRepository,
                       IWorkflowNodeRepository workflowNodeRepository,
                       //IFieldRepository fieldRepository,
                       IFieldChangeGroupRepository fieldChangeGroupRepository,
                       IItemLocationRepository itemLocationRepository,
                       IWorkflowTransitionRepository workflowTransitionRepository)
 {
     _context                = new ItemContext(settings);
     _itemTypeRepository     = itemTypeRepository;
     _workflowNodeRepository = workflowNodeRepository;
     //_fieldRepository = fieldRepository;
     _fieldChangeGroupRepository   = fieldChangeGroupRepository;
     _itemLocationRepository       = itemLocationRepository;
     _workflowTransitionRepository = workflowTransitionRepository;
 }
Esempio n. 26
0
        /// <summary>
        /// A virtual method inherited from the NBehave class SpecBase.
        /// This method is inherited by the tests to provide the CONTEXT under which they will
        /// run so as to reduce code duplication.
        /// </summary>
        protected override void Establish_context()
        {
            base.Establish_context();

            ///provides a stub value (mocked Session Factory) for the ItemTypeRepository constructor.
            _sessionFactory = new Mock <ISessionFactory>();

            ///create new mock object of the Session class.
            _session = new Mock <ISession>();

            ///stub method for SessionFactory.OpenSession that returns the mocked Session object.
            _sessionFactory.Setup(sf => sf.OpenSession()).Returns(_session.Object);

            ///new instace of the ItemTypeRepository with mock of the SessionFactory object as its parameter,
            _itemTypeRepository = new ItemTypeRepository(_sessionFactory.Object);
        }
Esempio n. 27
0
 public LookupService(
     IAddressRepository addressRepository,
     IAddressTypeRepository addressTypeRepository,
     ICustomerRepository customerRepository,
     IFileStoreRepository fileStoreRepository,
     IFilmContributorRepository filmContributorRepository,
     IFilmContributorTypeRepository filmContributorTypeRepository,
     IFormatTypeRepository formatTypeRepository,
     IInventoryItemFileStoreRepository inventoryItemFileStoreRepository,
     IInventoryItemFilmContributorRepository inventoryItemFilmContributorRepository,
     IInventoryItemFormatTypeRepository inventoryItemFormatTypeRepository,
     IInventoryItemItemTypeRepository inventoryItemItemTypeRepository,
     IInventoryItemPurchaseTypeRepository inventoryItemPurchaseTypeRepository,
     IInventoryItemRatingRepository inventoryItemRatingRepository,
     IInventoryItemRepository inventoryItemRepository,
     IInventoryItemReviewRepository inventoryItemReviewRepository,
     IInventoryItemTagRepository inventoryItemTagRepository,
     IItemTypeRepository itemTypeRepository,
     IPaymentInformationRepository paymentInformationRepository,
     IPurchaseTypeRepository purchaseTypeRepository,
     IRelatedItemRepository relatedItemRepository,
     IRentalHistoryRepository rentalHistoryRepository)
 {
     _addressRepository                      = addressRepository;
     _addressTypeRepository                  = addressTypeRepository;
     _customerRepository                     = customerRepository;
     _fileStoreRepository                    = fileStoreRepository;
     _filmContributorRepository              = filmContributorRepository;
     _filmContributorTypeRepository          = filmContributorTypeRepository;
     _formatTypeRepository                   = formatTypeRepository;
     _inventoryItemFileStoreRepository       = inventoryItemFileStoreRepository;
     _inventoryItemFilmContributorRepository = inventoryItemFilmContributorRepository;
     _inventoryItemFormatTypeRepository      = inventoryItemFormatTypeRepository;
     _inventoryItemItemTypeRepository        = inventoryItemItemTypeRepository;
     _inventoryItemPurchaseTypeRepository    = inventoryItemPurchaseTypeRepository;
     _inventoryItemRatingRepository          = inventoryItemRatingRepository;
     _inventoryItemRepository                = inventoryItemRepository;
     _inventoryItemReviewRepository          = inventoryItemReviewRepository;
     _inventoryItemTagRepository             = inventoryItemTagRepository;
     _itemTypeRepository                     = itemTypeRepository;
     _paymentInformationRepository           = paymentInformationRepository;
     _purchaseTypeRepository                 = purchaseTypeRepository;
     _relatedItemRepository                  = relatedItemRepository;
     _rentalHistoryRepository                = rentalHistoryRepository;
 }
Esempio n. 28
0
 public EventTypeController(IItemTypeRepository EventTyperepo)
 {
     _EventTyperepo = EventTyperepo;
 }
Esempio n. 29
0
        /// <summary>
        /// A virtual method inherited from the NBehave class SpecBase.
        /// This method is inherited by the tests to provide the CONTEXT under which they will
        /// run so as to reduce code duplication.
        /// </summary>
        protected override void Establish_context()
        {
            base.Establish_context();

            ///provides a stub value (mocked Session Factory) for the ItemTypeRepository constructor.
            _sessionFactory = new Mock<ISessionFactory>();

            ///create new mock object of the Session class.
            _session = new Mock<ISession>();

            ///stub method for SessionFactory.OpenSession that returns the mocked Session object.
            _sessionFactory.Setup(sf => sf.OpenSession()).Returns(_session.Object);

            ///new instace of the ItemTypeRepository with mock of the SessionFactory object as its parameter,
            _itemTypeRepository = new ItemTypeRepository(_sessionFactory.Object);
        }
Esempio n. 30
0
 public ItemCategoryMapper(IItemTypeRepository itemTypeRepository)
 {
     this.itemTypeRepository = itemTypeRepository;
 }
Esempio n. 31
0
 protected override void Establish_context()
 {
     base.Establish_context();
     _kernal = new StandardKernel(new IntegrationTestsModule());
     _itemTypeRepository = _kernal.Get<IItemTypeRepository>();
 }
Esempio n. 32
0
 public ItemController(IItemRepository itemRepository, IItemTypeRepository itemTypeRepository, IItemImageRepository itemImageRepository)
 {
     _itemRepository = itemRepository;
     _itemTypeRepository = itemTypeRepository;
     _itemImageRepository = itemImageRepository;
 }
Esempio n. 33
0
 public ItemTypeController(IItemTypeRepository itemRepository)
 {
     _itemTypeRepository = itemRepository;
 }
Esempio n. 34
0
 public ItemTypeService(IItemTypeRepository _itemTypeRepository, IItemTypeValidator _itemTypeValidator)
 {
     _repository = _itemTypeRepository;
     _validator = _itemTypeValidator;
 }
Esempio n. 35
0
 public ItemTypeController(IItemTypeRepository itemTypeRepository, IItemTypeReadRepository readRepository)
 {
     _itemTypeRepository = itemTypeRepository;
     _readRepository     = readRepository;
 }
 public ItemsControllerBuilder WithItemTypeRepository(IItemTypeRepository itemTypeRepository)
 {
     ItemTypeRepository = itemTypeRepository;
     return this;
 }
Esempio n. 37
0
 public ItemTypeBl(IItemTypeRepository itemTypeRepository, IMapper mapper)
 {
     _mapper             = mapper;
     _itemTypeRepository = itemTypeRepository;
 }
Esempio n. 38
0
 public ItemTypeService(IItemTypeRepository _itemTypeRepository, IItemTypeValidator _itemTypeValidator)
 {
     _repository = _itemTypeRepository;
     _validator  = _itemTypeValidator;
 }
Esempio n. 39
0
 public MasterDataManager(IItemTypeRepository itemTypeRepository, ICountryRepository countryRepository)
 {
     _itemTypeRepository = itemTypeRepository;
     _countryRepository  = countryRepository;
 }
Esempio n. 40
0
 public ItemTypeService(IItemTypeRepository itemTypeRepository)
 {
     _itemTypeRepository = itemTypeRepository;
 }
 public ItemTypesController(IItemTypeRepository itemTypeRepository, ICommonMapper mapper)
 {
     this.itemTypeRepository = itemTypeRepository;
     Mapper = mapper;
 }
Esempio n. 42
0
 public GetAllItemTypesQuery(IItemTypeRepository itemTypeRepository)
 {
     this.itemTypeRepository = itemTypeRepository;
 }