Added record's Deconstruct method support

This commit is contained in:
daver32
2021-08-15 16:31:06 +02:00
parent 841231e1ec
commit 02e671371e
4 changed files with 21 additions and 4 deletions
@@ -42,6 +42,23 @@ namespace InterfaceGenerator.Tests
_sut.RecordMethod();
}
[Fact]
public void Deconstruct_IsGenerated()
{
var method = typeof(ITestRecord).GetMethod(
nameof(TestRecord.Deconstruct));
method.Should().NotBeNull();
method.ReturnType.Should().Be(typeof(void));
var parameters = method.GetParameters();
parameters.Length.Should().Be(1);
var parameter = parameters[0];
parameter.ParameterType.Should().Be(typeof(int).MakeByRefType());
parameter.IsOut.Should().BeTrue();
}
}
[GenerateAutoInterface]