コード例 #1
0
        public void GivenUserConnectedWhenGetSessionThenReturnSessionAggregate()
        {
            _eventsStore.Store(new UserConnected(SessionId, UserId, DateTime.Now));

            var session = _repository.GetSession(SessionId);

            Check.That(session).IsNotNull();
        }
コード例 #2
0
ファイル: PortalActor.cs プロジェクト: cryptobuks/BitGifter
        private void Setup()
        {
            //driver = BuildFireFoxDriver();
            this._driver = BuildChromeDriver();
            // this.portal = new EgifterPortal(driver);
            this._portal = new FakePortal(_driver);
            var session = _sessionsRepository.GetSession();

            _portal.NavigateTo();
            SetAuthCookie(session);
        }
コード例 #3
0
        public Task <ActionResult <GenerationsViewModel> > AdvanceGenerationsAsync(Guid id, [FromBody] ForewardGenerationsInputModel inputModel = null)
        => Task.Run <ActionResult <GenerationsViewModel> >(() =>
        {
            var session = _repository.GetSession(id);

            if (session == null)
            {
                return(NotFound());
            }

            if (!session.IsActive)
            {
                return(BadRequest());
            }

            var viewModel = session.AdvanceGenerations(inputModel?.GenerationsCount ?? 200);
            return(Ok(viewModel));
        });