Example #1
0
        public TextSnapshotMock(string content, ITextBuffer textBuffer, TextVersionMock version) {
            TextProvider = new TextStream(content);
            TextBuffer = textBuffer;
            _lines = MakeLines(content);
            _version = version;

            Change = new TextChangeMock();
        }
        public TextVersionMock CreateNextVersion(TextChangeMock change)
        {
            _change = change;
            TextVersionMock nextVersion = new TextVersionMock(TextBuffer, VersionNumber + 1, Length + _change.Delta);

            Next = nextVersion;

            return nextVersion;
        }
Example #3
0
 public TextBufferMock(string content, string contentTypeName)
 {
     ContentType = new ContentTypeMock(contentTypeName, new IContentType[] { ContentTypeMock.TextContentType });
     TextVersionMock initialVersion = new TextVersionMock(this, 0, content.Length);
     CurrentSnapshot = new TextSnapshotMock(content, this, initialVersion);
 }