public void SetUp() { this.view = new MockAdEditBox(); this.preview = new MockAdViewPreview(); this.projectService = new MockProjectService(); this.configurationService = new MockConfigurationService(); }
public void SetUp() { this.view = new MockSettingsView(); this.projectService = new MockProjectService(); this.configurationService = new MockConfigurationService(); this.projectService.GetCurrentProjectReturnValue.AutoSaveInterval = 30; this.aspectRatioChangedEvent = new MockAspectRatioChangedEvent(); this.smpteTimeCodeChangedEvent = new MockSmtpeTimeCodeChangedEvent(); this.startTimeCodeChangedEvent = new MockStartTimeCodeChangedEvent(); this.editModeChangedEvent = new MockEditModeChangedEvent(); this.pickThumbnailEvent = new MockPickThumbnailEvent(); this.resetWindowsEvent = new MockResetWindowsEvent(); this.thumbnailEvent = new MockThumbnailEvent(); this.regionManager = new MockRegionManager(); this.mainRegion = new MockRegion { Name = RegionNames.MainRegion }; this.userSettingsService = new MockUserSettingsService(); this.persistenceService = new MockPersistenceService(); this.regionManager.Regions.Add(this.mainRegion); this.eventAggregator = new MockEventAggregator(); this.eventAggregator.AddMapping <AspectRatioChangedEvent>(this.aspectRatioChangedEvent); this.eventAggregator.AddMapping <SmpteTimeCodeChangedEvent>(this.smpteTimeCodeChangedEvent); this.eventAggregator.AddMapping <StartTimeCodeChangedEvent>(this.startTimeCodeChangedEvent); this.eventAggregator.AddMapping <EditModeChangedEvent>(this.editModeChangedEvent); this.eventAggregator.AddMapping <PickThumbnailEvent>(this.pickThumbnailEvent); this.eventAggregator.AddMapping <ThumbnailEvent>(this.thumbnailEvent); this.eventAggregator.AddMapping <ResetWindowsEvent>(this.resetWindowsEvent); }
public void SetUp() { this.dataServiceFacade = new MockDataServiceFacade(); this.configurationService = new MockConfigurationService(); this.errorView = new MockErrorView(); this.logger = new MockLoggerFacade(); }
public void SetUp() { this.playerEvent = new MockPlayerEvent(); this.view = new MockLibraryView(); this.regionManager = new MockRegionManager(); this.configurationService = new MockConfigurationService(); this.addAssetEvent = new MockAddAssetEvent(); this.assetsAvailableEvent = new MockAssetsAvailableEvent(); this.showMetadataEvent = new MockShowMetadataEvent(); this.resetWindowsEvent = new MockResetWindowsEvent(); this.assetsLoadingEvent = new MockAssetsLoadingEvent(); this.mainRegion = new MockRegion(); this.errorView = new MockErrorView(); this.mainRegion.Name = RegionNames.MainRegion; this.regionManager.Regions.Add(this.mainRegion); this.eventAggregator = new MockEventAggregator(); this.eventAggregator.AddMapping <AddAssetEvent>(this.addAssetEvent); this.eventAggregator.AddMapping <PlayerEvent>(this.playerEvent); this.eventAggregator.AddMapping <ShowMetadataEvent>(this.showMetadataEvent); this.eventAggregator.AddMapping <AssetsAvailableEvent>(this.assetsAvailableEvent); this.eventAggregator.AddMapping <ResetWindowsEvent>(this.resetWindowsEvent); this.eventAggregator.AddMapping <AssetsLoadingEvent>(this.assetsLoadingEvent); }
public void ShouldAddNotificationViewToNotificationsRegion() { var toolsRegion = new MockRegion(); var regionManager = new MockRegionManager(); var container = new MockUnityContainer(); var configurationService = new MockConfigurationService(); container.Bag.Add(typeof(INotificationViewPresenter), new MockNotificationViewPresenter()); container.Bag.Add(typeof(IProjectService), new MockProjectService()); container.Bag.Add(typeof(ICacheManager), new MockCacheManager()); container.Bag.Add(typeof(IConfigurationService), configurationService); toolsRegion.Name = RegionNames.NotificationsRegion; regionManager.Regions.Add(toolsRegion); configurationService.GetParameterValueReturnFunction = p => "polling"; var module = new ServicesModule(container, regionManager); Assert.AreEqual(0, toolsRegion.AddedViews.Count); module.Initialize(); Assert.AreEqual(1, toolsRegion.AddedViews.Count); Assert.IsInstanceOfType(toolsRegion.AddedViews[0], typeof(INotificationView)); }
public void SetUp2() { MockConfigurationService.Setup(mock => mock .Get <RecruitWebConfiguration>()) .Returns(new RecruitWebConfiguration { PageSize = PageSize }); }
public void TestInitialize() { this.view = new MockSubClipView(); this.eventAggregator = new MockEventAggregator(); this.resetWindowsEvent = new MockResetWindowsEvent(); this.addPreviewEvent = new MockAddPreviewEvent(); this.configurationService = new MockConfigurationService(); this.eventAggregator.AddMapping <ResetWindowsEvent>(this.resetWindowsEvent); this.eventAggregator.AddMapping <AddPreviewEvent>(this.addPreviewEvent); }
public void SetUp() { this.view = new MockProjectView(); this.regionManager = new MockRegionManager(); this.configurationService = new MockConfigurationService(); this.dataServiceFacade = new MockDataServiceFacade(); this.toolsRegion = new MockRegion(); this.toolsRegion.Name = RegionNames.ToolsRegion; this.regionManager.Regions.Add(this.toolsRegion); }
public void SetUp() { this.view = new MockAdEditBox(); this.preview = new MockAdViewPreview(); this.configurationService = new MockConfigurationService(); this.sequenceRegistry = new MockSequenceRegistry(); this.sequenceModel = new MockSequenceModel(); this.sequence = new Sequence(); this.sequenceRegistry.CurrentSequence = this.sequence; this.sequenceRegistry.CurrentSequenceModel = this.sequenceModel; }
public void SetUp() { this.view = new MockMetadataView(); this.showMetadataEvent = new MockShowMetadataEvent(); this.hideMetadataEvent = new MockHideMetadataEvent(); this.configurationService = new MockConfigurationService(); this.eventAggregator = new MockEventAggregator(); this.eventAggregator.AddMapping <ShowMetadataEvent>(this.showMetadataEvent); this.eventAggregator.AddMapping <HideMetadataEvent>(this.hideMetadataEvent); }
public void SetUp() { this.view = new MockCommentEditBox(); this.preview = new MockCommentViewPreview(); this.eventAggregator = new MockEventAggregator(); this.configurationService = new MockConfigurationService(); this.timelineModel = new MockTimelineModel(); this.playCommentEvent = new MockPlayCommentEvent(); this.commentUpdatedEvent = new MockCommentUpdatedEvent(); this.eventAggregator.AddMapping <PlayCommentEvent>(this.playCommentEvent); this.eventAggregator.AddMapping <CommentUpdatedEvent>(this.commentUpdatedEvent); }
public void TestInitialize() { this.container = new MockUnityContainer(); this.configurationService = new MockConfigurationService(); this.eventAggregator = new MockEventAggregator(); this.thumbnailEvent = new MockThumbnailEvent(); this.eventAggregator.AddMapping <ThumbnailEvent>(this.thumbnailEvent); this.sequenceModel = new SequenceModel(this.eventAggregator); this.sequence = new Sequence(); this.container.Bag[typeof(ISequenceModel)] = this.sequenceModel; }
public void SetUp() { this.view = new MockProjectView(); this.regionManager = new MockRegionManager(); this.configurationService = new MockConfigurationService(); this.dataServiceFacade = new MockDataServiceFacade(); this.mainRegion = new MockRegion(); this.eventAggregator = new MockEventAggregator(); this.resetWindowsEvent = new MockResetWindowsEvent(); this.eventAggregator.AddMapping <ResetWindowsEvent>(this.resetWindowsEvent); this.mainRegion.Name = RegionNames.MainRegion; this.regionManager.Regions.Add(this.mainRegion); }
public void SetUp() { this.view = new MockTitlesView(); this.eventAggregator = new MockEventAggregator(); this.addAssetToTimelineEvent = new MockAddAssetToTimelineEvent(); this.serviceFacade = new MockDataServiceFacade(); this.configurationService = new MockConfigurationService(); this.eventAggregator.AddMapping <AddAssetToTimelineEvent>(this.addAssetToTimelineEvent); this.regionManager = new MockRegionManager(); this.downloader = new MockDownloader(); this.toolsRegion = new MockRegion(); this.toolsRegion.Name = RegionNames.ToolsRegion; this.regionManager.Regions.Add(this.toolsRegion); }
public void SetUp() { MockVacancyPostingService.Setup(mock => mock.GetVacancyByReferenceNumber(It.IsAny <int>())) .Returns(_existingVacancy); MockVacancyPostingService.Setup(mock => mock.CreateVacancy(It.IsAny <Vacancy>())) .Returns <Vacancy>(v => v); MockReferenceDataService.Setup(mock => mock.GetSectors()) .Returns(new List <Sector> { new Sector { Id = 1, Standards = new List <Standard> { new Standard { Id = 1, ApprenticeshipSectorId = 1, ApprenticeshipLevel = ApprenticeshipLevel.Intermediate }, new Standard { Id = 2, ApprenticeshipSectorId = 1, ApprenticeshipLevel = ApprenticeshipLevel.Advanced }, new Standard { Id = 3, ApprenticeshipSectorId = 1, ApprenticeshipLevel = ApprenticeshipLevel.Higher }, new Standard { Id = 4, ApprenticeshipSectorId = 1, ApprenticeshipLevel = ApprenticeshipLevel.FoundationDegree }, new Standard { Id = 5, ApprenticeshipSectorId = 1, ApprenticeshipLevel = ApprenticeshipLevel.Degree }, new Standard { Id = 6, ApprenticeshipSectorId = 1, ApprenticeshipLevel = ApprenticeshipLevel.Masters } } } }); MockProviderService.Setup(s => s.GetVacancyOwnerRelationship(ProviderSiteId, EdsUrn)) .Returns(_vacancyOwnerRelationship); MockConfigurationService .Setup(mock => mock.Get <CommonWebConfiguration>()) .Returns(_webConfiguration); MockReferenceDataService .Setup(mock => mock.GetCategories()) .Returns(_categories); }
public void SetUp() { this.view = new MockCommentEditBox(); this.preview = new MockCommentViewPreview(); this.eventAggregator = new MockEventAggregator(); this.configurationService = new MockConfigurationService(); this.sequenceModel = new MockSequenceModel(); this.playCommentEvent = new MockPlayCommentEvent(); this.commentUpdatedEvent = new MockCommentUpdatedEvent(); this.sequenceRegistry = new MockSequenceRegistry(); this.sequence = new Sequence(); this.sequenceRegistry.CurrentSequence = this.sequence; this.sequenceRegistry.CurrentSequenceModel = this.sequenceModel; this.eventAggregator.AddMapping <PlayCommentEvent>(this.playCommentEvent); this.eventAggregator.AddMapping <CommentUpdatedEvent>(this.commentUpdatedEvent); }
public void TestInitialize() { this.view = new MockProjectBrowserView(); this.projectService = new MockProjectService(); this.sequenceRegistry = new MockSequenceRegistry(); this.eventAggregator = new MockEventAggregator(); this.statusEvent = new MockStatusEvent(); this.resetWindowsEvent = new MockResetWindowsEvent(); this.saveProjectEvent = new MockSaveProjectEvent(); this.configurationService = new MockConfigurationService(); this.eventAggregator.AddMapping <SaveProjectEvent>(this.saveProjectEvent); this.eventAggregator.AddMapping <StatusEvent>(this.statusEvent); this.eventAggregator.AddMapping <ResetWindowsEvent>(this.resetWindowsEvent); this.saveProjectEvent.WasPublished = false; this.project = new Project(); this.projectService.GetCurrentProjectReturnValue = this.project; }
public void ShouldRegisterViews() { var configurationService = new MockConfigurationService(); var container = new MockUnityContainer(); var module = new TestableServicesModule(container); container.Bag.Add(typeof(IConfigurationService), configurationService); configurationService.GetParameterValueReturnFunction = p => "polling"; module.InvokeRegisterViewsAndServices(); Assert.AreEqual(17, container.Types.Count); Assert.AreEqual(typeof(NotificationView), container.Types[typeof(INotificationView)]); Assert.AreEqual(typeof(NotificationViewPresenter), container.Types[typeof(INotificationViewPresenter)]); Assert.AreEqual(typeof(DataServiceFacade), container.Types[typeof(IDataServiceFacade)]); Assert.AreEqual(typeof(AssetsDataServiceFacade), container.Types[typeof(IAssetsDataServiceFacade)]); Assert.AreEqual(typeof(DefaultEventDataParser), container.Types[typeof(IEventDataParser <EventData>)]); Assert.AreEqual(typeof(DefaultEventOffsetParser), container.Types[typeof(IEventDataParser <EventOffset>)]); Assert.AreEqual(typeof(ProjectService), container.Types[typeof(IProjectService)]); Assert.AreEqual(typeof(TimelineBarRegistry), container.Types[typeof(ITimelineBarRegistry)]); Assert.AreEqual(typeof(CodecPrivateDataParser), container.Types[typeof(ICodecPrivateDataParser)]); Assert.AreEqual(typeof(CompositeSmoothStreamingCache), container.Types[typeof(ICache)]); Assert.AreEqual(typeof(FifoPurgeStrategy), container.Types[typeof(IPurgeStrategy)]); Assert.AreEqual(typeof(CacheManager), container.Types[typeof(ICacheManager)]); Assert.AreEqual(typeof(XmlKeyboardManagerService), container.Types[typeof(KeyboardManagerService)]); Assert.AreEqual(typeof(UserSettingsService), container.Types[typeof(IUserSettingsService)]); Assert.AreEqual(typeof(SequenceRegistry), container.Types[typeof(ISequenceRegistry)]); Assert.AreEqual(typeof(PollingLogEntryCollection), container.Types[typeof(ILogEntryCollection)]); Assert.AreEqual(2, container.MappingInformation.Count); Assert.AreEqual(typeof(IsolatedStorageSmoothStreamingCache), container.MappingInformation[typeof(ICache)].Item2); Assert.AreEqual("PrimaryCache", container.MappingInformation[typeof(ICache)].Item1); Assert.AreEqual(typeof(DefaultKeyboardManagerService), container.MappingInformation[typeof(KeyboardManagerService)].Item2); Assert.AreEqual("DefaultKeyboardManager", container.MappingInformation[typeof(KeyboardManagerService)].Item1); }
public void SetUp() { this.configurationService = new MockConfigurationService(); this.eventDataParser = new MockEventDataParser(); this.eventOffsetParser = new MockEventOffsetParser(); }
public void SetUp() { this.overlaysManager = new MockOverlaysManager(); this.overlaysDisplayController = new MockOverlaysDisplayController(); this.rubberBandingManager = new MockRubberBandingManager(); this.manifestMediaModel = new MockManifestMediaModel(); this.view = new MockPlayerView(); this.eventAggregator = new MockEventAggregator(); this.sequenceModel = new MockSequenceModel(); this.playbackManifestGenerator = new MockPlaybackManifestGenerator(); this.keyMappingEvent = new MockKeyMappingEvent(); this.fullScreenEvent = new MockFullScreenEvent(); this.playheadMovedEvent = new MockPlayheadMovedEvent(); this.pauseEvent = new MockPauseEvent(); this.addCommentEvent = new MockPositionDoubleClickedEvent(); this.positionUpdatedEvent = new MockPositionUpdatedEvent(); this.playerEvent = new MockPlayerEvent(); this.playCommentEvent = new MockPlayCommentEvent(); this.hideMetadataEvent = new MockHideMetadataEvent(); this.showMetadataEvent = new MockShowMetadataEvent(); this.showPreviewOverlayEvent = new MockShowPreviewOverlayEvent(); this.hidePreviewOverlayEvent = new MockHidePreviewOverlayEvent(); this.resetWindowsEvent = new MockResetWindowsEvent(); this.rubberBandingStateChangedEvent = new MockRubberBandingStateChangedEvent(); this.operationExecutedInTimelineEvent = new MockOperationExecutedInTimelineEvent(); this.operationUndoneInTimelineEvent = new MockOperationUndoneInTimelineEvent(); this.playEvent = new MockPlayEvent(); this.playClickedEvent = new MockPlayClickedEvent(); this.checkedTreatGapAsErrorEvent = new MockCheckedTreatGapAsErrorEvent(); this.trackMuteStateChangedEvent = new MockTrackMuteStateChangedEvent(); this.aspectRatioChangedEvent = new MockAspectRatioChangedEvent(); this.smpteTimeCodeChangedEvent = new MockSmpteTimecodeChangedEvent(); this.pickThumbnailEvent = new MockPickThumbnailEvent(); this.thumbnailEvent = new MockThumbnailEvent(); this.cacheManager = new MockCacheManager(); this.configurationSettings = new MockConfigurationService(); this.sequenceRegistry = new MockSequenceRegistry(); this.sequenceRegistry.CurrentSequenceModel = this.sequenceModel; this.eventAggregator.AddMapping <PlayClickedEvent>(this.playClickedEvent); this.eventAggregator.AddMapping <KeyMappingEvent>(this.keyMappingEvent); this.eventAggregator.AddMapping <FullScreenEvent>(this.fullScreenEvent); this.eventAggregator.AddMapping <SmpteTimeCodeChangedEvent>(this.smpteTimeCodeChangedEvent); this.eventAggregator.AddMapping <PlayheadMovedEvent>(this.playheadMovedEvent); this.eventAggregator.AddMapping <AspectRatioChangedEvent>(this.aspectRatioChangedEvent); this.eventAggregator.AddMapping <PauseEvent>(this.pauseEvent); this.eventAggregator.AddMapping <PositionUpdatedEvent>(this.positionUpdatedEvent); this.eventAggregator.AddMapping <PlayerEvent>(this.playerEvent); this.eventAggregator.AddMapping <PlayCommentEvent>(this.playCommentEvent); this.eventAggregator.AddMapping <PositionDoubleClickedEvent>(this.addCommentEvent); this.eventAggregator.AddMapping <HideMetadataEvent>(this.hideMetadataEvent); this.eventAggregator.AddMapping <ShowMetadataEvent>(this.showMetadataEvent); this.eventAggregator.AddMapping <PickThumbnailEvent>(this.pickThumbnailEvent); this.eventAggregator.AddMapping <ThumbnailEvent>(this.thumbnailEvent); this.eventAggregator.AddMapping <PlayEvent>(this.playEvent); this.eventAggregator.AddMapping <ShowPreviewOverlayEvent>(this.showPreviewOverlayEvent); this.eventAggregator.AddMapping <HidePreviewOverlayEvent>(this.hidePreviewOverlayEvent); this.eventAggregator.AddMapping <RubberBandingStateChangedEvent>(this.rubberBandingStateChangedEvent); this.eventAggregator.AddMapping <ResetWindowsEvent>(this.resetWindowsEvent); this.eventAggregator.AddMapping <OperationExecutedInTimelineEvent>(this.operationExecutedInTimelineEvent); this.eventAggregator.AddMapping <OperationUndoneInTimelineEvent>(this.operationUndoneInTimelineEvent); this.eventAggregator.AddMapping <CheckedTreatGapAsErrorEvent>(this.checkedTreatGapAsErrorEvent); this.eventAggregator.AddMapping <TrackMuteStateChangedEvent>(this.trackMuteStateChangedEvent); }