Skip to content

Commit

Permalink
Adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vmachacek committed Oct 24, 2023
1 parent acc757e commit b53ec56
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace CodeGenHelpers.SampleCode
{
partial class CanPassMultipleParametersOfSameType
{
CanPassMultipleParametersOfSameType(string str1, string str2)
: base(str1, str2)
{
}
}
}
27 changes: 27 additions & 0 deletions tests/CodeGenHelpers.Tests/Tests/ConstructorBuilderTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Xunit;
using Xunit.Abstractions;

namespace CodeGenHelpers.Tests;

public class ConstructorBuilderTests : TestBase
{
public ConstructorBuilderTests(ITestOutputHelper testOutput)
: base(testOutput)
{
}

[Fact]
public void CanPassMultipleParametersOfSameType()
{
var builder = CodeBuilder.Create(Namespace)
.AddClass("CanPassMultipleParametersOfSameType");

builder.AddConstructor().WithBaseCall(new[]
{
("string", "str1"),
("string", "str2"),
});

MakeAssertion(builder);
}
}

0 comments on commit b53ec56

Please # to comment.