Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
Archivo: Menu.cs Proyecto: FTC5/Museum
        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());
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 5
0
Archivo: Menu.cs Proyecto: FTC5/Museum
 public Menu(IMapper mapper, IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
     : base(excursionsScheduleService, expositionService, grafikService)
 {
     this.mapper = mapper;
 }
Ejemplo n.º 6
0
 public abstract void GetExposition(IExpositionService expositionService);
Ejemplo n.º 7
0
 protected MenuTemplate(IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService)
 {
     this.excursionsScheduleService = excursionsScheduleService;
     this.expositionService         = expositionService;
     this.grafikService             = grafikService;
 }
Ejemplo n.º 8
0
 public ExpositionController(IMapper mapper, IExpositionService expositionService)
 {
     this.mapper            = mapper;
     this.expositionService = expositionService;
 }
Ejemplo n.º 9
0
 public ExcursionsScheduleService(IExpositionService expositionService, IMapper mapper, IUnitOfWork db) : base(mapper, db)
 {
     this.expositionService = expositionService;
 }