/// <inheritdoc/> public override SegmentViewModelBase CreateSegmentModelViewModel(Enum segmentTypeDescriptor, int trackNumber, int startFrame, int endFrame, string name = null) { MockSegmentModel model = new MockSegmentModel(startFrame, endFrame, trackNumber, new KeyFrameModelCollection() { new MockKeyFrameModel(startFrame) }, name ?? segmentTypeDescriptor?.ToString()); return(new MockSegmentViewModel(model, _scriptVideoContext, _rootUndoObject, _undoService, _undoChangeFactory, _clipboardService)); }
public ClipboardServiceTests() { _clipboardService = new ClipboardService(); _testSegmentModel = new MockSegmentModel(0, 22, 0, new KeyFrameModelCollection() { new MockKeyFrameModel(0), new MockKeyFrameModel(10), new MockKeyFrameModel(22) }, "Mock Segment" ); }
public void TestAdds() { var firstSegment = new MockSegmentModel(0, 10, 0); var secondSegment = new MockSegmentModel(0, 10, 1); var thirdSegment = new MockSegmentModel(15, 25, 0); _segmentModelCollection.Add(firstSegment); _segmentModelCollection.Add(secondSegment); _segmentModelCollection.Add(thirdSegment); Assert.Equal(3, _segmentModelCollection.Count); // Check sort order (should order by TrackNumber, then by StartFrame) Assert.Equal(firstSegment, _segmentModelCollection[0]); Assert.Equal(thirdSegment, _segmentModelCollection[1]); Assert.Equal(secondSegment, _segmentModelCollection[2]); }