예제 #1
0
        public void InitializeTest()
        {
            var editor = new StateFullTextEditor(true);

            _cut          = editor.StateFullDocument;
            _tempFilePath = ConfigurationHandler.Current.TemporalFilesPath +
                            Constants.TemporalDocumentName;
        }
예제 #2
0
        public void CompareDocumentHasChanged()
        {
            if (File.Exists(_tempFilePath))
            {
                File.Delete(_tempFilePath);
            }

            var editor = new StateFullTextEditor(true);
            var cut    = editor.StateFullDocument;

            editor.Selection.InsertText(Constants.HelloWorldText);
            editor.CacheChanges(_tempFilePath);
            var hasChanges = cut.HasChanged(_tempFilePath);

            hasChanges.Should().BeTrue();
        }