diff --git a/Sybil.IntegrationTests/FlowTests.cs b/Sybil.IntegrationTests/FlowTests.cs index 206dc76..28b7147 100644 --- a/Sybil.IntegrationTests/FlowTests.cs +++ b/Sybil.IntegrationTests/FlowTests.cs @@ -34,6 +34,8 @@ public sealed class TestClass : BaseTestClass, IInterface where T : new(), cl this.fieldString = 0; return this.fieldString; } + + public string GetSomething(); }"; [TestMethod] @@ -95,7 +97,11 @@ public sealed class TestClass : BaseTestClass, IInterface where T : new(), cl .WithTypeParameter(SyntaxBuilder.CreateTypeParameter("T")) .WithAttribute(SyntaxBuilder.CreateAttribute("SomeAttribute4") .WithArgument(0.5f)) - .WithBody("this.fieldString = 0;\r\nreturn this.fieldString;")))) + .WithBody("this.fieldString = 0;\r\nreturn this.fieldString;")) + .WithMethod( + SyntaxBuilder.CreateMethod("string", "GetSomething") + .WithModifier("public") + .WithNoBody()))) .Build(); var compilationUnit = compilationUnitSyntax.ToFullString(); diff --git a/Sybil/MethodBuilder.cs b/Sybil/MethodBuilder.cs index bf258d3..c115dee 100644 --- a/Sybil/MethodBuilder.cs +++ b/Sybil/MethodBuilder.cs @@ -169,6 +169,7 @@ namespace Sybil } return this.MethodDeclarationSyntax + .WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)) .NormalizeWhitespace(); } } diff --git a/Sybil/Sybil.csproj b/Sybil/Sybil.csproj index f599cbc..bb1ea07 100644 --- a/Sybil/Sybil.csproj +++ b/Sybil/Sybil.csproj @@ -2,7 +2,7 @@ netstandard2.0 - 0.8.2 + 0.8.3