Ejemplo n.º 1
0
        public async Task CopyItemPath()
        {
            IImmutableSet <IProjectTree> nodes1;
            IImmutableSet <IProjectTree> nodes2;
            var filePath = @"C:\Temp";

            CreateTestNodeSetPair(filePath, out nodes1, out nodes2);

            var cmd = new CopyItemPathCommand(_interactiveWorkflowProvider);

            await InUI(() => CheckSingleNodeCommandStatusAsync(cmd, RPackageCommandId.icmdCopyItemPath, nodes1, nodes2));

            var contents = await InUI(() => Clipboard.GetText());

            contents.Should().Be("\"" + filePath + "\"");
        }
Ejemplo n.º 2
0
        public async Task CopyItemPath()
        {
            IImmutableSet <IProjectTree> nodes1;
            IImmutableSet <IProjectTree> nodes2;
            var filePath = @"C:\Temp";

            CreateTestNodeSetPair(filePath, out nodes1, out nodes2);

            var cmd = new CopyItemPathCommand(_interactiveWorkflowProvider);

            await CheckSingleNodeCommandStatusAsync(cmd, RPackageCommandId.icmdCopyItemPath, nodes1, nodes2);

            await VsAppShell.Current.DispatchOnMainThreadAsync(() => {
                var contents = Clipboard.GetText();
                contents.Should().Be("\"" + filePath + "\"");
            });

            VsRHostScript.DoIdle(500);
        }