public void TestInitialize()
        {
            var training = _service.Command <CreateTraining>().Execute("TEST RAPPEL " + Guid.NewGuid(), 20, Color.Empty.ToArgb());
            var trainer  = _service.Command <CreateTrainer>().Execute("TEST RAPPEL " + Guid.NewGuid(), Guid.NewGuid().ToString(), "");
            var location = _service.Command <CreateLocation>().Execute("TEST LIEU " + Guid.NewGuid(), "", 20);
            var session  = _service.Command <PlanSession>().Execute(training.AggregateId, DateTime.Now, 1, 20, location.AggregateId, trainer.AggregateId);

            _context = new NotificationTestContext(_service, session, new NotificationQueries());
        }
Beispiel #2
0
        public void not_create_location_whith_same_name()
        {
            var locationName = "LOCATION_" + Guid.NewGuid();

            _service.Command <CreateLocation>().Execute(locationName, "", 10);

            Action action = () => _service.Command <CreateLocation>().Execute(locationName, "", 10);

            action.ShouldThrow <LocationAlreadyExistsException>();
        }
        public Seat CreateSeat(Guid?companyId = null, bool sendValidationNotification = true)
        {
            var student = _service.Command <CreateStudent>().Execute("TEST RAPPEL " + Guid.NewGuid(), Guid.NewGuid().ToString());

            if (!companyId.HasValue)
            {
                var company = _service.Command <CreateCompany>().Execute("TEST RAPPEL " + Guid.NewGuid(), "", "", "");
                companyId = company.AggregateId;
            }

            var seat = _service.Command <BookSeat>().Execute(SessionId, student.AggregateId, companyId.Value, sendValidationNotification);

            seat.SessionId.Should().NotBeEmpty();

            return(seat);
        }
Beispiel #4
0
        public void plan_new_session()
        {
            var trainer  = _service.Command <CreateTrainer>().Execute("TEST", DateTime.Now.ToString("G"), "*****@*****.**");
            var location = _service.Command <CreateLocation>().Execute(DateTime.Now.ToString("G"), "test", 5);

            var createdFormation = _service.Command <CreateTraining>().Execute("Essai " + DateTime.Now.ToString("G"), 2, Color.Empty.ToArgb());

            _service.Command <PlanSession>().Execute(createdFormation.AggregateId, new DateTime(2018, 1, 8), 3, 5, location.AggregateId, trainer.AggregateId);
        }