public void ShouldRaisePropertyChangeForDurationWhenCurrentSequenceModelDurationPropertyChanges()
        {
            var sequenceModel = new MockSequenceModel();

            this.sequenceRegistry.CurrentSequenceModel = sequenceModel;

            var  viewModel = this.CreateViewModel();
            bool wasRaised = false;

            viewModel.PropertyChanged += (s, a) =>
            {
                if (a.PropertyName == "Duration")
                {
                    wasRaised = true;
                }
            };

            Assert.IsFalse(wasRaised);

            sequenceModel.InvokePropertyChanged("NotRaise");

            Assert.IsFalse(wasRaised);

            sequenceModel.InvokePropertyChanged("Duration");

            Assert.IsTrue(wasRaised);
        }
Esempio n. 2
0
 public void SetUp()
 {
     this.sequenceModel = new MockSequenceModel
     {
         Duration = TimeCode.FromAbsoluteTime(10000, SmpteFrameRate.Smpte30)
     };
 }
        public void SetUp()
        {
            this.view             = new MockMarkerEditBox();
            this.preview          = new MockMarkerViewPreview();
            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 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;
        }
Esempio n. 5
0
        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 SetUp()
        {
            this.view                = new MockCommentsBarView();
            this.eventAggregator     = new MockEventAggregator();
            this.sequenceModel       = new MockSequenceModel();
            this.timelineBarRegistry = new MockTimelineBarRegistry();

            this.positionDoubleClickedEvent = new MockPositionDoubleClickedEvent();
            this.refreshElementsEvent       = new MockRefreshElementsEvent();
            this.addPreviewEvent            = new MockAddPreviewEvent();
            this.deleteAllPreviewsEvent     = new MockDeleteAllPreviewsEvent();
            this.removePreviewEvent         = new MockRemovePreviewEvent();

            this.sequenceRegistry = new MockSequenceRegistry();
            this.sequenceRegistry.CurrentSequenceModel = this.sequenceModel;

            this.eventAggregator.AddMapping <PositionDoubleClickedEvent>(this.positionDoubleClickedEvent);
            this.eventAggregator.AddMapping <RefreshElementsEvent>(this.refreshElementsEvent);
            this.eventAggregator.AddMapping <AddPreviewEvent>(this.addPreviewEvent);
            this.eventAggregator.AddMapping <DeleteAllPreviewsEvent>(this.deleteAllPreviewsEvent);
            this.eventAggregator.AddMapping <RemovePreviewEvent>(this.removePreviewEvent);
        }
        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);
        }
Esempio n. 8
0
 public void SetUp()
 {
     this.sequenceModel = new MockSequenceModel();
 }