Ejemplo n.º 1
0
        public async Task GetCommandStatusAsync_NonAppDesignerFolderAsNodes_ReturnsUnhandled()
        {
            var command = CreateInstance(provider: IProjectTreeProviderFactory.Create(), dlg: IVsAddProjectItemDlgFactory.Create());

            var tree = ProjectTreeParser.Parse(@"
Root (flags: {ProjectRoot})
    Properties (flags: {AppDesignerFolder})
");

            var nodes = ImmutableHashSet.Create(tree.Children[0]);

            var result = await command.GetCommandStatusAsync(nodes, GetCommandId(), true, "commandText", (CommandStatus)0);

            Assert.False(result.Handled);
        }
Ejemplo n.º 2
0
        public async Task TryHandleCommandAsync_NonRegularFolderAsNodes_ReturnsFalse()
        {
            var command = CreateInstance(provider: IProjectTreeProviderFactory.Create(), dlg: IVsAddProjectItemDlgFactory.Create());

            var tree = ProjectTreeParser.Parse(@"
Root (flags: {ProjectRoot})
    Properties (flags: {AppDesignerFolder})
");

            var nodes = ImmutableHashSet.Create(tree.Children[0]);

            var result = await command.TryHandleCommandAsync(nodes, GetCommandId(), true, 0, IntPtr.Zero, IntPtr.Zero);

            Assert.False(result);
        }