Exemple #1
0
        public override void SingUpTOCustomerExcursions(IExcursionsScheduleService excursionsScheduleService)
        {
            Choice("Please enter custome excursion id:");
            string setting = "";

            Console.WriteLine("Register one persone press 1.\n" +
                              "Register many persone press another symbol");
            setting = Console.ReadLine();
            try
            {
                if (setting == "1")
                {
                    excursionsScheduleService.SignUpToCustomExcursion(choice, mapper.Map <CustomerDTO>(CreateOne()));
                }
                else
                {
                    excursionsScheduleService.SignUpToCustomExcursion(choice, mapper.Map <IEnumerable <CustomerDTO> >(CreateMany()));
                }
            }catch (ExcursionNotFoundException ex1)
            {
                Console.WriteLine(ex1.Message);
            }
            catch (SmallAgeCustomerException ex2)
            {
                Console.WriteLine(ex2.ToString());
            }
        }
Exemple #2
0
        public override void GetExpositionScheduleExcursions(IExcursionsScheduleService excursionsScheduleService)
        {
            Choice("Please enter grafik or exposition Id :");
            var scheduleExcursion = excursionsScheduleService.GetScheduledExcursionsInfo(choice);

            if (scheduleExcursion == null)
            {
                Console.WriteLine("Not found");
                return;
            }
            Console.WriteLine(scheduleExcursion.ToString());
        }
Exemple #3
0
        public void SetUp()
        {
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            IMapper mapper = new MapperConfiguration(cfg => cfg.AddProfile <AutoMapping>()).CreateMapper();;

            using (var kernel = new NSubstituteMockingKernel())
            {
                _expositionService = kernel.Get <IExpositionService>();
            }
            _unitOfWork = Substitute.For <IUnitOfWork>();
            _excursionsScheduleService = new ExcursionsScheduleService(_expositionService, mapper, _unitOfWork);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            IKernel kernel = new StandardKernel(new PLModule(), new BLLModule("MuseumContext"));

            kernel.Load(Assembly.GetExecutingAssembly());
            IMapper mapper = kernel.Get <IMapper>();
            IExcursionsScheduleService excursionsSchedule = kernel.Get <IExcursionsScheduleService>();
            IExpositionService         exposition         = kernel.Get <IExpositionService>();
            IGrafikService             grafik             = kernel.Get <IGrafikService>();
            IMenu menu = new Menu(mapper, excursionsSchedule, exposition, grafik);

            menu.MainMenu();
        }
Exemple #5
0
        public override void GetExpositionCustomerExcursions(IExcursionsScheduleService excursionsScheduleService)
        {
            Choice("Please enter grafik or exposition Id :");
            var customeExcursion = excursionsScheduleService.GetCustomExcursions(choice);

            if (customeExcursion == null)
            {
                Console.WriteLine("Not found");
                return;
            }
            foreach (var item in customeExcursion)
            {
                Console.WriteLine(item.ToString());
            }
        }
Exemple #6
0
 public Menu(IMapper mapper, IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
     : base(excursionsScheduleService, expositionService, grafikService)
 {
     this.mapper = mapper;
 }
 public CustomExcursionController(IMapper mapper, IExcursionsScheduleService excursionsScheduleService)
 {
     this.mapper = mapper;
     this.excursionsScheduleService = excursionsScheduleService;
 }
Exemple #8
0
 public abstract void SingUpTOCustomerExcursions(IExcursionsScheduleService excursionsScheduleService);
Exemple #9
0
 public abstract void GetExpositionCustomerExcursions(IExcursionsScheduleService excursionsScheduleService);
Exemple #10
0
 protected MenuTemplate(IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
 {
     this.excursionsScheduleService = excursionsScheduleService;
     this.expositionService         = expositionService;
     this.grafikService             = grafikService;
 }