51 references to NamespaceDeclaration
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (25)
CodeGeneration\SyntaxGeneratorTests.cs (25)
225Generator.NamespaceDeclaration("n"),
1752Generator.NamespaceDeclaration("n"),
1756Generator.NamespaceDeclaration("n.m"),
1760Generator.NamespaceDeclaration("n",
1765Generator.NamespaceDeclaration("n",
1780Generator.NamespaceDeclaration("n")),
1797Generator.NamespaceDeclaration("n",
1924Generator.CompilationUnit(Generator.NamespaceDeclaration("n")),
1931Generator.CompilationUnit(Generator.NamespaceDeclaration("n")),
2754AssertMemberNamesEqual("n2", Generator.AddMembers(Generator.NamespaceDeclaration("n"), [Generator.NamespaceDeclaration("n2")]));
2755AssertMemberNamesEqual("n", Generator.AddMembers(Generator.CompilationUnit(), [Generator.NamespaceDeclaration("n")]));
2761AssertMemberNamesEqual(new[] { "n1", "n2" }, Generator.AddMembers(Generator.NamespaceDeclaration("n", [Generator.NamespaceDeclaration("n1")]), [Generator.NamespaceDeclaration("n2")]));
2762AssertMemberNamesEqual(new[] { "n1", "n2" }, Generator.AddMembers(Generator.CompilationUnit(declarations: [Generator.NamespaceDeclaration("n1")]), [Generator.NamespaceDeclaration("n2")]));
2843TestRemoveAllMembers(Generator.NamespaceDeclaration("n", [Generator.NamespaceDeclaration("n")]));
2844TestRemoveAllMembers(Generator.CompilationUnit(declarations: [Generator.NamespaceDeclaration("n")]));
2888Assert.Equal(DeclarationKind.Namespace, Generator.GetDeclarationKind(Generator.NamespaceDeclaration("n")));
2911Assert.Equal("n", Generator.GetName(Generator.NamespaceDeclaration("n")));
2934Assert.Equal("n", Generator.GetName(Generator.WithName(Generator.NamespaceDeclaration("x"), "n")));
2957Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceDeclaration("n")));
2981Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private)));
3005Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.NamespaceDeclaration("n")));
3028Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.NamespaceDeclaration("n"), DeclarationModifiers.Abstract)));
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (26)
CodeGeneration\SyntaxGeneratorTests.vb (26)
1674Generator.NamespaceDeclaration("n"),
1679Generator.NamespaceDeclaration("n.m"),
1684Generator.NamespaceDeclaration("n",
1692Generator.NamespaceDeclaration("n",
1712Generator.NamespaceDeclaration("n")),
1736Generator.NamespaceDeclaration("n",
2232Generator.CompilationUnit(Generator.NamespaceDeclaration("n")),
2242Generator.CompilationUnit(Generator.NamespaceDeclaration("n")),
2583Assert.Equal(DeclarationKind.Namespace, Generator.GetDeclarationKind(Generator.NamespaceDeclaration("n")))
2608Assert.Equal("n", Generator.GetName(Generator.NamespaceDeclaration("n")))
2633Assert.Equal("n", Generator.GetName(Generator.WithName(Generator.NamespaceDeclaration("x"), "n")))
2655Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceDeclaration("n")))
2683Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private)))
2710Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.NamespaceDeclaration("n")))
2732Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.NamespaceDeclaration("n"), DeclarationModifiers.Abstract)))
3172AssertMemberNamesEqual("n2", Generator.AddMembers(Generator.NamespaceDeclaration("n"), {Generator.NamespaceDeclaration("n2")}))
3173AssertMemberNamesEqual("n", Generator.AddMembers(Generator.CompilationUnit(), {Generator.NamespaceDeclaration("n")}))
3179AssertMemberNamesEqual({"n1", "n2"}, Generator.AddMembers(Generator.NamespaceDeclaration("n", {Generator.NamespaceDeclaration("n1")}), {Generator.NamespaceDeclaration("n2")}))
3180AssertMemberNamesEqual({"n1", "n2"}, Generator.AddMembers(Generator.CompilationUnit(declarations:={Generator.NamespaceDeclaration("n1")}), {Generator.NamespaceDeclaration("n2")}))
3189TestRemoveAllMembers(Generator.AddMembers(Generator.NamespaceDeclaration("n", {Generator.NamespaceDeclaration("n1")})))
3190TestRemoveAllMembers(Generator.AddMembers(Generator.CompilationUnit(declarations:={Generator.NamespaceDeclaration("n1")})))