Пример #1
0
        public void TestAttemptRenameFile()
        {
            ContextBase ctx     = this.CreateContextAndLoad();
            MyUIShell   myShell = new MyUIShell();

            ctx.uiShell = myShell;

            ctx.DTE.Solution.Projects.Item(1).
            ProjectItems.Item("Form1.cs").Name = "Form.cs";
            ctx.CheckForException();

            Assert.IsTrue(myShell.MessageBoxShown);
            Assert.IsTrue(File.Exists(
                              Path.Combine(this.WcPath, "Form1.cs")));
            Assert.AreEqual("Form1.cs", ctx.DTE.Solution.Projects.Item(1).
                            ProjectItems.Item("Form1.cs").Name);
        }
Пример #2
0
        public void TestAttemptRenameFile()
        {
            ContextBase ctx = this.CreateContextAndLoad();
            MyUIShell myShell = new MyUIShell();
            ctx.uiShell = myShell;

            ctx.DTE.Solution.Projects.Item(1).
                ProjectItems.Item( "Form1.cs" ).Name = "Form.cs";
            ctx.CheckForException();

            Assert.IsTrue( myShell.MessageBoxShown );
            Assert.IsTrue( File.Exists(
                Path.Combine( this.WcPath, "Form1.cs" ) ) );
            Assert.AreEqual( "Form1.cs", ctx.DTE.Solution.Projects.Item(1).
                ProjectItems.Item( "Form1.cs" ).Name );
        }