Beispiel #1
0
        public void SetUp()
        {
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            IMapper mapper = new MapperConfiguration(cfg => cfg.AddProfile <AutoMapping>()).CreateMapper();;

            _unitOfWork    = Substitute.For <IUnitOfWork>();
            _grafikService = new GrafikService(mapper, _unitOfWork);
        }
Beispiel #2
0
        public override void SearchExposition(IGrafikService grafikService)
        {
            string search;

            Console.WriteLine("Please enter exposition name:");
            search = Console.ReadLine();
            var grafiks = grafikService.FindByName(search);

            foreach (var item in grafiks)
            {
                Console.WriteLine(item.ToString());
            }
        }
Beispiel #3
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();
        }
Beispiel #4
0
        public override void GetGrafik(IGrafikService grafikService)
        {
            var grafiks = grafikService.GetGrafiks();

            if (grafiks == null)
            {
                Console.WriteLine("Not found");
                return;
            }
            foreach (var item in grafiks)
            {
                Console.WriteLine(item.ToString());
            }
        }
Beispiel #5
0
 public Menu(IMapper mapper, IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
     : base(excursionsScheduleService, expositionService, grafikService)
 {
     this.mapper = mapper;
 }
Beispiel #6
0
 public abstract void SearchExposition(IGrafikService grafikService);
Beispiel #7
0
 public abstract void GetGrafik(IGrafikService grafikService);
Beispiel #8
0
 protected MenuTemplate(IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
 {
     this.excursionsScheduleService = excursionsScheduleService;
     this.expositionService         = expositionService;
     this.grafikService             = grafikService;
 }
Beispiel #9
0
 public GrafikController(IMapper mapper, IGrafikService grafikService)
 {
     this.mapper        = mapper;
     this.grafikService = grafikService;
 }