test/Misc/EFTools/InProcTests/UndoRedoTestsRemote.cs
/// <summary>
///     Perform an action, then undo. The document should not be dirty
/// </summary>
Perform an action, then undo. The document should not be dirty
Perform an action then undo . The document should not be dirty
[TestMethod]
        [HostType("VS IDE")]
        public void Bug567795_TestDirty()
        {
            UITestRunner.Execute(TestContext.TestName, 
                () =>
                    {
                        const string testName = "UndoRedo.Bug567795_TestDirty";
                        ExecuteUndoRedoTest(
                            testName, "NorthwindModel.edmx", (commandProcessorContext, artifact) =>
                                {
                                    var dte = VsIdeTestHostContext.Dte;
                                    new CommandProcessor(
                                        commandProcessorContext,
                                        artifact.GetFreshConceptualEntity("Orders").GetDeleteCommand()).Invoke();
                                    Assert.IsTrue(dte.IsDocumentDirty(artifact.LocalPath()));
                                    dte.ExecuteCommandForOpenDocument(artifact.LocalPath(), UndoCommand);
                                    Assert.IsFalse(dte.IsDocumentDirty(artifact.LocalPath()));
                                });
                    });
        }
[ TestMethod ] [ HostType ( " " ) ] public void Bug567795_TestDirty ( ) { UITestRunner . Execute ( TestContext . TestName , ( ) => { const string testName = " " ; ExecuteUndoRedoTest ( testName , " " , ( commandProcessorContext , artifact ) => { var dte = VsIdeTestHostContext . Dte ; new CommandProcessor ( commandProcessorContext , artifact . GetFreshConceptualEntity ( " " ) . GetDeleteCommand ( ) ) . Invoke ( ) ; Assert . IsTrue ( dte . IsDocumentDirty ( artifact . LocalPath ( ) ) ) ; dte . ExecuteCommandForOpenDocument ( artifact . LocalPath ( ) , UndoCommand ) ; Assert . IsFalse ( dte . IsDocumentDirty ( artifact . LocalPath ( ) ) ) ; } ) ; } ) ; }
Perform an action, then undo.
Perform an action then undo .