- [X] Adds options for SerializableField. Example: ```cs [SerializableField(0, getter: "protected", setter: "protected", isVritual: true)] private int _someField; ``` Defaults: `getter: "public", setter: "public", isVirtual: false`
23 lines
510 B
C#
23 lines
510 B
C#
using System.Collections.Immutable;
|
|
using System.Text;
|
|
using Microsoft.CodeAnalysis;
|
|
using SerializationGenerator;
|
|
using Xunit;
|
|
|
|
namespace SerializationGeneratorTests
|
|
{
|
|
public class GenerateClassTests
|
|
{
|
|
[Fact]
|
|
public void Test1()
|
|
{
|
|
var source = new StringBuilder();
|
|
source.GenerateClassStart(
|
|
"TestClass",
|
|
ImmutableArray<ITypeSymbol>.Empty
|
|
);
|
|
|
|
Assert.NotEmpty(source.ToString());
|
|
}
|
|
}
|
|
}
|