Beispiel #1
0
        //private readonly IItemService itemService;
        //private readonly IItemCategoryService itemCategoryService;
        //private readonly ICategoryService categoryService;

        public AuctionFacade(IUnitOfWorkProvider unitOfWorkProvider, IAuctionService auctionService,
                             IRaiseService raiseService)
            : base(unitOfWorkProvider)
        {
            this.auctionService = auctionService;
            this.raiseService   = raiseService;
        }
Beispiel #2
0
        public void TestInitialize()
        {
            _productRepository = new MongoDBRepositoryTest <Product>();
            _bidRepository     = new MongoDBRepositoryTest <Bid>();

            var eventPublisher = new Mock <IMediator>();

            //eventPublisher.Setup(x => x.PublishAsync(new object()));
            _eventPublisher = eventPublisher.Object;

            var productService = new Mock <IProductService>();

            _productService = productService.Object;

            _cacheManager = new Mock <ICacheManager>().Object;

            _serviceProvider = new Mock <IServiceProvider>().Object;

            _auctionService = new AuctionService(_bidRepository, _productService, _productRepository, _cacheManager, _eventPublisher);

            _productRepository.Insert(new Product
            {
                ProductType = ProductType.Auction,
                Name        = "Temp"
            });
        }
Beispiel #3
0
 public GetAddToCartHandler(
     IProductAttributeFormatter productAttributeFormatter,
     ITranslationService translationService,
     ITaxService taxService,
     IPricingService priceCalculationService,
     IPriceFormatter priceFormatter,
     IShoppingCartService shoppingCartService,
     IOrderCalculationService orderTotalCalculationService,
     IPictureService pictureService,
     IProductService productService,
     IProductAttributeParser productAttributeParser,
     IAuctionService auctionService,
     ShoppingCartSettings shoppingCartSettings,
     TaxSettings taxSettings,
     MediaSettings mediaSettings)
 {
     _productAttributeFormatter = productAttributeFormatter;
     _translationService        = translationService;
     _taxService                   = taxService;
     _pricingService               = priceCalculationService;
     _priceFormatter               = priceFormatter;
     _shoppingCartService          = shoppingCartService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _pictureService               = pictureService;
     _productService               = productService;
     _productAttributeParser       = productAttributeParser;
     _auctionService               = auctionService;
     _shoppingCartSettings         = shoppingCartSettings;
     _taxSettings                  = taxSettings;
     _mediaSettings                = mediaSettings;
 }
Beispiel #4
0
 public OfertasBancoModel(IAuctionService aS, IGlobalService gS, SignInManager <User> signInManager, IAuthService auS)
 {
     this._aS            = aS;
     this._gS            = gS;
     this._auS           = auS;
     this._signInManager = signInManager;
 }
        public BidsController()
        {
            this.repo          = new EFMainRepository();
            this.memberService = new SimpleMemberService(this.repo);

            this.auctionService = new AuctionService(this.repo, this.memberService);
        }
 public LightningAuctionAdminService(IConfiguration config, IAuctionService auctionService, ILndService lndService)
 {
     _auctionService  = auctionService;
     _lnd             = lndService;
     AuthorizedPubkey = config.GetValue <string>("admin_pub");
     MessageToSign    = config.GetValue <string>("message");
 }
 public ProffesionSkillTierViewModel(IFrameNavigationService navigationService, IBlizzApiService blizzApiService, IAuctionService auctionService)
 {
     _navigationService = navigationService;
     _blizzApiService   = blizzApiService;
     _auctionService    = auctionService;
     ConfigureCommands();
 }
Beispiel #8
0
 public MercadoFacturasModel(IAuctionService aS, SignInManager <User> signInManager, IGlobalService gS, IAuthService authS)
 {
     this._aS            = aS;
     this._gS            = gS;
     this._authS         = authS;
     this._signInManager = signInManager;
 }
Beispiel #9
0
 public GetAddToCartHandler(
     IProductAttributeFormatter productAttributeFormatter,
     ILocalizationService localizationService,
     ITaxService taxService,
     IPriceCalculationService priceCalculationService,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     IShoppingCartService shoppingCartService,
     ICacheManager cacheManager,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPictureService pictureService,
     IProductService productService,
     IProductAttributeParser productAttributeParser,
     IAuctionService auctionService,
     ShoppingCartSettings shoppingCartSettings,
     TaxSettings taxSettings,
     MediaSettings mediaSettings)
 {
     _productAttributeFormatter = productAttributeFormatter;
     _localizationService       = localizationService;
     _taxService = taxService;
     _priceCalculationService      = priceCalculationService;
     _currencyService              = currencyService;
     _priceFormatter               = priceFormatter;
     _shoppingCartService          = shoppingCartService;
     _cacheManager                 = cacheManager;
     _orderTotalCalculationService = orderTotalCalculationService;
     _pictureService               = pictureService;
     _productService               = productService;
     _productAttributeParser       = productAttributeParser;
     _auctionService               = auctionService;
     _shoppingCartSettings         = shoppingCartSettings;
     _taxSettings   = taxSettings;
     _mediaSettings = mediaSettings;
 }
Beispiel #10
0
        public Auction(AuctionId id, DateTime endDateTime, long productId,
                       Participant participant, Money startingPrice, IAuctionService service, IEventPublisher publisher) : base(publisher)
        {
            if (endDateTime <= DateTime.Now)
            {
                throw new Exception();
            }
            if (startingPrice.Amount <= 0)
            {
                throw  new Exception();
            }
            if (service.HasAnyOpenAuction(participant.Id))
            {
                throw new Exception();
            }
            if (!participant.IsActive)
            {
                throw  new Exception();
            }

            this.Id             = id;
            this.EndDateTime    = endDateTime;
            this.CreateDateTime = DateTime.Now;
            this.ProductId      = productId;
            this.Seller         = participant;
            this.StartingPrice  = startingPrice;

            Publish(new AuctionOpened(this.Id.DbId, this.EndDateTime, this.ProductId, this.Seller.Id, this.StartingPrice.Amount));
        }
 public BidController(IBidService bidService, IAuctionService auctionService, IProductService productService, AuctionHubDbContext db, UserManager <User> userManager)
 {
     this.auctionService = auctionService;
     this.bidService     = bidService;
     this.userManager    = userManager;
     this.productService = productService;
 }
Beispiel #12
0
 public AuctionCommandHandlers(IAuctionRepository repository, IAuctionService service
                               , IEventPublisher publisher, IParticipantService participantService)
 {
     _repository         = repository;
     this._service       = service;
     _publisher          = publisher;
     _participantService = participantService;
 }
Beispiel #13
0
		public AccountController(IAuctionService auctionService, IUserService userService)
		{
			Contract.Requires(auctionService != null);
			Contract.Requires(userService != null);

			mAuctionService = auctionService;
			mUserService    = userService;
		}
Beispiel #14
0
 public AuctionBuilder()
 {
     this._price       = 1000;
     this._auctionId   = new AuctionId(1);
     this._endDateTime = DateTime.Now.AddYears(1);
     this._seller      = new Participant(1, true);
     this._service     = new FakeAuctionService(false);
 }
Beispiel #15
0
 public FacturasVencimientoModel(IInvoiceService iS, IPeopleService pS, IGlobalService gS, IAuthService aS, IAuctionService auS)
 {
     this._iS  = iS;
     this._auS = auS;
     this._gS  = gS;
     this._pS  = pS;
     this._aS  = aS;
 }
 public AuctionController(IDbRepository<Auction> auctions,
     IDbRepository<Item> items,
     IAuctionService auctionService)
 {
     this.dataAuction = auctions;
     this.dataItem = items;
     this.auctionService = auctionService;
 }
Beispiel #17
0
        public AuctionController()
        {
            var repo = new EFMainRepository();

            this.memberService = new SimpleMemberService(repo);

            this.auctionService = new AuctionService(repo, this.memberService);
        }
 public AuctionsController(IRepository <Auction> repository, IMapper mapper,
                           IRepository <PriceRaise> raiseRepository, IAuctionService auctionService, UserManager <ApplicationUser> userManager)
 {
     _repository      = repository;
     _mapper          = mapper;
     _raiseRepository = raiseRepository;
     _auctionService  = auctionService;
     _userManager     = userManager;
 }
Beispiel #19
0
 public RunActionForm(Auction auction)
 {
     InitializeComponent();
     this._auction = auction;
     _auctionClient = new AuctionServiceClient();
     dataGridView1.DataSource = auction.Lots;
     _lotCount = 0;
     NextLot();
 }
 public CompraFacturaModel(IInvoiceService iS, SignInManager <User> signInManager, IGlobalService gS, IAuthService aS, IAuctionService auctionService, IPeopleService peopleService)
 {
     this._iS             = iS;
     this._pS             = peopleService;
     this._auctionService = auctionService;
     this._signInManager  = signInManager;
     this._aS             = aS;
     this._gS             = gS;
 }
 public PagoFacturasModel(SignInManager <User> signInManager, IPeopleService peopleService, IGlobalService globalService, IPaymentService paymentService, IAuctionService auctionService, IAuthService authService)
 {
     _auctionService = auctionService;
     _authService    = authService;
     _paymentService = paymentService;
     _globalService  = globalService;
     _peopleService  = peopleService;
     _signInManager  = signInManager;
 }
        public AuctionController(IAuctionService <int> ias, IUserService ius, IBidService ibs, ICategoryAccessor ics)
        {
            auctionService     = ias;
            userService        = ius;
            bidService         = ibs;
            categoriesAccessor = ics;

            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        }
Beispiel #23
0
 public LotController(
     IAuctionService auctionService,
     UserManager <ApplicationUser> userManager,
     IHubContext <BiddingHub> biddingHubContext)
 {
     this.auctionService    = auctionService;
     this.userManager       = userManager;
     this.biddingHubContext = biddingHubContext;
 }
Beispiel #24
0
 public AuctionFacade(IUnitOfWorkProvider unitOfWorkProvider, IAuctionService auctionService, ICategoryService categoryService,
                      IAccountService accountService, IBidService bidService)
     : base(unitOfWorkProvider)
 {
     this.auctionService  = auctionService;
     this.categoryService = categoryService;
     this.accountService  = accountService;
     this.bidService      = bidService;
 }
Beispiel #25
0
        public AuctionHub(IUserService userService, IAuctionService auctionService)
        {
            _userService    = userService;
            _auctionService = auctionService;

            _auctionProcess            = new AuctionProcess(_auctionService);
            _auctionProcess.SendState += SendState;
            _auctionProcess.Start();
        }
 public AuctionTests()
 {
     auctionService = new AuctionService();
     userService = new UserService();
     productService = new ProductService();
     currencyService = new CurrencyService();
     categoryService = new CategoryService();
     roleService = new RoleService();
     productAuctionService = new ProductAuctionService();
 }
 public AuctionProcessFacade(IUnitOfWorkProvider unitOfWorkProvider, IAuctionService auctionService,
                             IClosingAuctionService closingAuctionService, IBidService bidService, ICategoryService categoryService, IUserLoginService userLoginService)
     : base(unitOfWorkProvider)
 {
     _auctionService        = auctionService;
     _closingAuctionService = closingAuctionService;
     _bidService            = bidService;
     _categoryService       = categoryService;
     _userLoginService      = userLoginService;
 }
		public void SetUp()
		{
			mDbContext = new TestAuctioneerDbContext(Effort.DbConnectionFactory.CreateTransient());

			AddTestData(mDbContext);

			mUserNotifierMock = A.Fake<IUserNotifier>();
			var userService   = new UserService(mDbContext, mUserNotifierMock);
			mTestedService    = new AuctionService(mDbContext, mUserNotifierMock, userService, "Ignored", "Ignored");
		}
Beispiel #29
0
        public CreateAuctionForm()
        {
            InitializeComponent();
            _auctionClient = new AuctionServiceClient();
            _artPieceClient = new ArtPieceServiceClient();
            LotClient = new LotServiceClient();

            List<ArtPiece> artPieces = new List<ArtPiece>();
            BindArtPieces();
        }
        public MainViewModel(IMemberService memberService, IAuctionService auctionService)
        {
            this._auctionService = auctionService;
            this._memberService  = memberService;

            foreach (var auction in this._auctionService.GetAll())
            {
                auctions.Add(new AuctionViewModel(auction));
            }
        }
        static App()
        {
            SetupCulture();
            MainRepository = new FileSystemMainRepository("file.dat");
            AuctionRunner = new AuctionRunner(MainRepository);
            MemberService = new SimpleMemberService(MainRepository);
            AuctionService = new AuctionService(MainRepository, MemberService);

            InitTestAuctionData();
            AuctionRunner.Start();
        }
        public MainWindow()
        {
            InitializeComponent();

            IMainRepository mainRepo = ((App)Application.Current)._mainRepository;

            this._auctionService = new AuctionService(mainRepo, new SimpleMemberService(mainRepo));
            this._auctions       = new ObservableCollection <Auction>(this._auctionService.GetAll());

            DataContext = this;
        }
Beispiel #33
0
        public BidViewModel(Auction selectedAuction, IAuctionService auctionService)
        {
            this.auctionService  = auctionService;
            this.selectedAuction = selectedAuction;

            this.CloseDialogCommand    = new RelayCommand <Window>(this.CloseAction);
            this.AddBidAndCloseCommand = new RelayCommand <Window>(this.AddBidAndCloseAction);

            // Default Values
            this.YourBid = Math.Max(this.selectedAuction.CurrentPrice, this.selectedAuction.StartPrice);
        }
Beispiel #34
0
 public EndAuctionsTask(IAuctionService auctionService,
                        IWorkflowMessageService workflowMessageService, LocalizationSettings localizationService, IShoppingCartService shoppingCartService,
                        ICustomerService customerService, ILogger logger)
 {
     _auctionService         = auctionService;
     _workflowMessageService = workflowMessageService;
     _localizationSettings   = localizationService;
     _shoppingCartService    = shoppingCartService;
     _customerService        = customerService;
     _logger = logger;
 }
Beispiel #35
0
 public EndAuctionsTask(IAuctionService auctionService,
                        IMessageProviderService messageProviderService, LanguageSettings translationService, IShoppingCartService shoppingCartService,
                        ICustomerService customerService, ILogger logger)
 {
     _auctionService         = auctionService;
     _messageProviderService = messageProviderService;
     _languageSettings       = translationService;
     _shoppingCartService    = shoppingCartService;
     _customerService        = customerService;
     _logger = logger;
 }
		public CategoryController(ICategoryService categoryService,
		                          IAuctionService auctionService,
		                          IBreadcrumbBuilder breadcrumbBuilder,
		                          HttpRequestBase request,
		                          HttpResponseBase response)
		{
			mCategoryService   = categoryService;
			mAuctionService    = auctionService;
			mBreadcrumbBuilder = breadcrumbBuilder;
			mRequest           = request;
			mResponse          = response;
		}
 public AuctionsController(IMapper mapper,
                           IAuctionService auctionService,
                           ICategoryService categoryService,
                           IUserService userService,
                           IAuthorizationService authorizationService)
 {
     _mapper               = mapper;
     _auctionService       = auctionService;
     _categoryService      = categoryService;
     _userService          = userService;
     _authorizationService = authorizationService;
 }
        public UserTests()
        {
            userService = new UserService();
            roleService = new RoleService();
            categoryService = new CategoryService();
            currencyService = new CurrencyService();
            productService = new ProductService();
            auctionService = new AuctionService();
            productAuctionService = new ProductAuctionService();

            GetRole();
        }
Beispiel #39
0
 public EndAuctionsTask(IProductService productService, IAuctionService auctionService, IQueuedEmailService queuedEmailService,
                        IWorkflowMessageService workflowMessageService, LocalizationSettings localizationService, IShoppingCartService shoppingCartService,
                        ICustomerService customerService, ILogger logger)
 {
     this._productService         = productService;
     this._auctionService         = auctionService;
     this._workflowMessageService = workflowMessageService;
     this._localizationSettings   = localizationService;
     this._shoppingCartService    = shoppingCartService;
     this._customerService        = customerService;
     this._logger = logger;
 }
Beispiel #40
0
        public BidViewModel(Auction selectedAuction, IMemberService memberService, IAuctionService auctionService)
        {
            this.memberService = memberService;
            this.auctionService = auctionService;
            this.selectedAuction = selectedAuction;

            this.CloseDialogCommand = new RelayCommand<Window>(this.CloseAction);
            this.AddBidAndCloseCommand = new RelayCommand<Window>(this.AddBidAndCloseAction);

            // Default Values
            this.YourBid = Math.Max(this.selectedAuction.CurrentPrice, this.selectedAuction.StartPrice);
        }
        public OverviewViewModel(IAuctionService auctionService, IAuctionRunner auctionRunner)
        {
            this.auctionService = auctionService;
            AddNewstAuctionToMainView();

            //auctionRunner.Auctioneer.AuctionStarted += ReloadAuctions;
            //auctionRunner.Auctioneer.AuctionEnded += ReloadAuctions;
            //auctionRunner.Auctioneer.BidAccepted += ReloadAuctions;
            //auctionRunner.Auctioneer.BidDeclined += ReloadAuctions;

            NewAuction = new RelayCommand(ShowGetImageDialog, () => true);
        }
Beispiel #42
0
 public void Update()
 {
     try {
         Test();
         _service = new AuctionServiceClient();
         _service.Update(_auction);
     }
     catch (Exception e) {
         Console.WriteLine(e);
         Assert.Fail();
     }
 }
Beispiel #43
0
        public void GetAll()
        {
            try {
                Test();
                _service = new AuctionServiceClient();

                Assert.IsNotNull(_service.GetAll());
            }
            catch (Exception e) {
                Console.WriteLine(e);
                Assert.Fail();
            }
        }
		public void SetUp()
		{
			mDbContext = new TestAuctioneerDbContext(Effort.DbConnectionFactory.CreateTransient());

			mDbContext.Categories.Add(new TestCategory { Id = 1 });
			mDbContext.Users.Add(new TestUser { Id = "1" });
			mDbContext.Users.Add(new TestUser { Id = "2" });
			mDbContext.Users.Add(new TestUser { Id = "3" });
			mDbContext.SaveChanges();

			mUserNotifierMock = A.Fake<IUserNotifier>();
			var userService   = new UserService(mDbContext, mUserNotifierMock);
			mTestedService    = new AuctionService(mDbContext, mUserNotifierMock, userService, "Ignored", "Ignored");
		}
Beispiel #45
0
		public AuctionController(IAuctionService auctionService,
		                         ICategoryService categoryService,
		                         ICurrencyService currencyService,
		                         IBreadcrumbBuilder breadcrumbBuilder)
		{
			Contract.Requires(auctionService != null);
			Contract.Requires(categoryService != null);
			Contract.Requires(currencyService != null);
			Contract.Requires(breadcrumbBuilder != null);

			mAuctionService = auctionService;
			mCategoryService = categoryService;
			mCurrencyService = currencyService;
			mBreadcrumbBuilder = breadcrumbBuilder;
		}
		public void SetUp()
		{
			mCategoryServiceMock   = A.Fake<ICategoryService>();
			mAuctionServiceMock    = A.Fake<IAuctionService>();
			mBreadcrumbBuilderMock = A.Fake<IBreadcrumbBuilder>();
			mRequestMock           = A.Fake<HttpRequestBase>();
			mResponseMock          = A.Fake<HttpResponseBase>();

			mTestedController = new CategoryController(mCategoryServiceMock, mAuctionServiceMock, mBreadcrumbBuilderMock,
			                                           mRequestMock, mResponseMock);

			var fakePagedList = A.Fake<IPagedList<Auction>>();
			A.CallTo(() => fakePagedList.PageNumber).Returns(1);
			A.CallTo(() => fakePagedList.PageSize).Returns(1);
			A.CallTo(() => mAuctionServiceMock.GetActiveAuctionsInCategory(0, null, 0, 0, 0)).WithAnyArguments().Returns(fakePagedList);
		}
        public MainViewModel(IAuctioneer auctioneer, IAuctionService auctionService)
        {
            this.auctioneer = auctioneer;
            this.auctionService = auctionService;

            this.AddNewAuctionCommand = new RelayCommand(this.AddNewAuctionAction);

            // Register for Events
            this.auctioneer.AuctionEnded += (sender, args) => { this.ApplyChanges(args.Auction); };
            this.auctioneer.AuctionStarted += (sender, args) => { this.ApplyChanges(args.Auction); };
            this.auctioneer.BidAccepted += (sender, args) => { this.ApplyChanges(args.Auction); };
            this.auctioneer.BidDeclined += (sender, args) => { this.ApplyChanges(args.Auction); };

            // Setup UI
            var allAuctions = this.auctionService.GetAll();
            foreach (var auction in allAuctions)
            {
                var auctionVm = new AuctionViewModel(auction);
                this.auctions.Add(auctionVm);
            }
        }
 public AuctionsController(IAuctionService auctionService,
     ILocalizationService localizationService,
     IVendorService vendorService,
     ICurrencyService currencyService,
     CurrencySettings currencySettings,
     IDateTimeHelper dateTimeHelper,
     IWorkContext workContext,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IStoreService storeService,
     IProductService productService)
 {
     _auctionService = auctionService;
     _localizationService = localizationService;
     _vendorService = vendorService;
     _currencyService = currencyService;
     _currencySettings = currencySettings;
     _dateTimeHelper = dateTimeHelper;
     _workContext = workContext;
     _categoryService = categoryService;
     _manufacturerService = manufacturerService;
     _storeService = storeService;
     _productService = productService;
 }
 public AuctionController(IAuctionService auctionService)
 {
     this._auctionService = auctionService;
 }
 public DefaultController(IAuctionService auctionService)
 {
     _auctionService = auctionService;
 }
Beispiel #51
0
		public HomeController(IAuctionService auctionService, IBreadcrumbBuilder breadcrumbBuilder)
		{
			mAuctionService    = auctionService;
			mBreadcrumbBuilder = breadcrumbBuilder;
		}
 public PublicAuctionController(IAuctionService service)
 {
     this.service = service;
 }
 public AuctionsController()
 {
     _auctionService = new AuctionService();
 }
 public HomeController(IAuctionService service)
 {
     this.auctions = service;
 }
Beispiel #55
0
 public AuctionController(IAuctionService auctionService, IAuctionOfferService auctionOfferService)
 {
     _auctionService = auctionService;
     _auctionOfferService = auctionOfferService;
 }