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

            _unitOfWork        = Substitute.For <IUnitOfWork>();
            _expositionService = new ExpositionService(mapper, _unitOfWork);
        }
Exemple #2
0
        public override void GetExposition(IExpositionService expositionService)
        {
            Choice("Please enter grafik or exposition Id :");
            var exposition = expositionService.GetExpositionInfo(choice);

            if (exposition == null)
            {
                Console.WriteLine("Not found");
                return;
            }
            Console.WriteLine(exposition.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 Menu(IMapper mapper, IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
     : base(excursionsScheduleService, expositionService, grafikService)
 {
     this.mapper = mapper;
 }
Exemple #6
0
 public abstract void GetExposition(IExpositionService expositionService);
Exemple #7
0
 protected MenuTemplate(IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
 {
     this.excursionsScheduleService = excursionsScheduleService;
     this.expositionService         = expositionService;
     this.grafikService             = grafikService;
 }
Exemple #8
0
 public ExpositionController(IMapper mapper, IExpositionService expositionService)
 {
     this.mapper            = mapper;
     this.expositionService = expositionService;
 }
 public ExcursionsScheduleService(IExpositionService expositionService, IMapper mapper, IUnitOfWork db) : base(mapper, db)
 {
     this.expositionService = expositionService;
 }