Skip to content

Commit

Permalink
fix: generated source in the wrong namespace (#1162)
Browse files Browse the repository at this point in the history
* fix: generated source in the wrong namespace

fixing a bad convention

* Automatically linting code

---------

Co-authored-by: RLittlesII <[email protected]>
  • Loading branch information
RLittlesII and RLittlesII authored Mar 22, 2024
1 parent 01f77f4 commit 4e16a1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public partial class AutoFixtureGenerator
{
private static NamespaceDeclarationSyntax BuildNamespace(ISymbol namedTypeSymbol)
{
var displayString = namedTypeSymbol.ContainingNamespace.ToDisplayString() + ".Tests";
var displayString = namedTypeSymbol.ContainingNamespace.ToDisplayString();
return NamespaceDeclaration(
ParseName(displayString)
)
Expand Down
2 changes: 1 addition & 1 deletion src/Testing.AutoFixtures/AutoFixtureGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void GenerateFixtureBuilder(
.WithMembers(new(fullList));

// TODO: [rlittlesii: March 01, 2024] Configure use of same namespace, or define a namespace, or add suffix.
var namespaceDeclaration = BuildNamespace(namedTypeSymbol)
var namespaceDeclaration = BuildNamespace(syntaxContext.TargetSymbol)
.WithMembers(new(classDeclaration));

var usings =
Expand Down

0 comments on commit 4e16a1e

Please sign in to comment.