public VenueManagementViewModel(IVenueService venueService) { this.venueService = venueService; NameInput = ""; ShortCutInput = ""; this.Venues = new ObservableCollection<VenueViewModel>(); UpdateVenues(); }
public void CreateVenueShouldCallRepository() { VenueDto venue = new VenueDto(); m_VenueRepositoryMock = new Mock<IVenueRepository>(); m_VenueService = new VenueService(m_VenueRepositoryMock.Object); m_VenueService.CreateVenue(venue); m_VenueRepositoryMock.Verify(x => x.Persist(It.IsAny<Venue>()), Times.Once); }
public void DeleteVenueShouldCallRepository() { const int venueId = 1; m_VenueRepositoryMock = new Mock<IVenueRepository>(); m_VenueService = new VenueService(m_VenueRepositoryMock.Object); m_VenueService.DeleteVenue(venueId); m_VenueRepositoryMock.Verify(x => x.Delete(venueId), Times.Once); }
public void GetVenuesShouldCallRepository() { m_VenueRepositoryMock = new Mock<IVenueRepository>(); m_VenueRepositoryMock.Setup(x => x.GetVenues()).Returns(new Task<IList<Venue>>(() => new List<Venue>())); m_VenueService = new VenueService(m_VenueRepositoryMock.Object); m_VenueService.GetVenues(); m_VenueRepositoryMock.Verify(x => x.GetVenues(), Times.Once); }
public static void ClassInitialize(TestContext testContext) { db = new MYSQLDatabase("Server = localhost; Database = ufotest; Uid = root;"); vdao = new VenueDao(db); catdao = new CategoryDao(db); coudao = new CountryDao(db); adao = new ArtistDao(db); pdao = new PerformanceDao(db); vs = ServiceFactory.CreateVenueService(db); }
public PerformanceManagementViewModel(IPerformanceService performanceService, IArtistService artistService, IVenueService venueService) { this.performanceService = performanceService; this.artistService = artistService; this.venueService = venueService; PerformancesForDay = new ObservableCollection<PerformanceViewModel>(); Venues = new ObservableCollection<Venue>(); Artists = new ObservableCollection<Artist>(); CurrentDay = new DisplayDateTime(DateTime.Now); UpdatePerformancesForDay(); UpdateVenues(); UpdateArtists(); DateTime now = DateTime.Now; timeInput = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0); if(Venues.Count > 0) { VenueInput = Venues[0]; } if(Artists.Count > 0) { ArtistInput = Artists[0]; } CurrentDay.PropertyChanged += CurrentDay_PropertyChanged; }
public VenueController(IVenueService venueService) { m_VenueService = venueService; }
public ShowsController(IShowService showsService, IVenueService venuesService) { this.showService = showsService; this.venueService = venuesService; }
public VenueCommandHandlerFactory(IVenueService service) { _service = service; }
public EventsController(IEventsService eventService, INotificationsService notificationsService, ISportsService sportsService, IUserChallengesService challengeService, IVenueService venueService, IUnitOfWorkAsync unitOfWork) { _eventService = eventService; _sportsService = sportsService; _challengeService = challengeService; _venueService = venueService; _notificationsService = notificationsService; _unitOfWork = unitOfWork; }
public ReservationService(IConfiguration configuration, IVenueService venuesService) { this.database = new PetaPoco.Database(configuration.GetConnectionString("BookMyShowDB"), "System.Data.SqlClient"); this.venuesService = venuesService; }
public static async Task <Dictionary <Guid, string> > GetVenueNames(IEnumerable <Course> courses, IVenueService venueService) { Dictionary <Guid, string> venueNames = new Dictionary <Guid, string>(); foreach (var course in courses) { foreach (var courseRun in course.CourseRuns) { if (courseRun.VenueId != Guid.Empty && courseRun.VenueId != null) { if (!venueNames.ContainsKey((Guid)courseRun.VenueId)) { var result = await venueService.GetVenueByIdAsync(new GetVenueByIdCriteria(courseRun.VenueId.ToString())); if (result.IsSuccess) { Guid.TryParse(result.Value.ID, out Guid venueId); venueNames.Add(venueId, result.Value.VenueName); } } } } } return(venueNames); }
public VenueController(IVenueService venueService) { _venueService = venueService; }
public VenueController(IVenueService service, IMapper mapper) : base(service, mapper) { _service = service; }
public VenuesController(IVenueService venueService, IMapper mapper) { _venueService = venueService; _mapper = mapper; }
public VenueController() { IDatabase db = DatabaseConnection.GetDatabase(); vs = ServiceFactory.CreateVenueService(db); }
public SessionController(ISessionService sessionService, ITalkService talkService, IVenueService venueService) { this.sessionService = sessionService; this.talkService = talkService; this.venueService = venueService; }