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); }
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()); }
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); }
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(); }
public Menu(IMapper mapper, IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService) : base(excursionsScheduleService, expositionService, grafikService) { this.mapper = mapper; }
public abstract void GetExposition(IExpositionService expositionService);
protected MenuTemplate(IExcursionsScheduleService excursionsScheduleService, IExpositionService expositionService, IGrafikService grafikService) { this.excursionsScheduleService = excursionsScheduleService; this.expositionService = expositionService; this.grafikService = grafikService; }
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; }