<commit_before># builderbuilder
Generate code for my unit-test builders.<commit_msg>Add example to readme.<commit_after># builderbuilder
Generate code for my unit-test builders.

## Example
This tool will take an entity, for example:
```
using ...

namespace ...
{
    [Class]
    public class ExampleEntity
    {
        [Id]
        public virtual long? Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [ManyToMany]
        public virtual IEnumerable<Stuff> Stuffs { get; set; }

        public virtual int IgnoreMe()
        {
            return 42;
        }
    }
}
```

And turn it into a builder:
```
using ...

namespace Declaratiegeneratie.WebApplication.VIPLive.Test. ...
{
    public class ExampleEntityTestHelper
    {
        public static ExampleEntityBuilder Builder()
        {
            return new ExampleEntityBuilder();
        }


        public class ExampleEntityBuilder
        {
            private ExampleEntity _exampleEntity;

            public ExampleEntityBuilder() : this(new ExampleEntity()) { }

            public ExampleEntityBuilder(ExampleEntity exampleEntity)
            {
                _exampleEntity = exampleEntity;
            }

            public ExampleEntityBuilder WithId(long? id)
            {
                _exampleEntity.Id = id;
                return this;
            }

            public ExampleEntityBuilder WithName(string name)
            {
                _exampleEntity.Name = name;
                return this;
            }

            public ExampleEntity Build()
            {
                return _exampleEntity;
            }

            public ExampleEntity Persist(DeclaratiegeneratieZorggroepenDbTest context)
            {
                SaveToDatabase(context);
                return Build();
            }

            private void SaveToDatabase(DeclaratiegeneratieZorggroepenDbTest context)
            {
                context.SaveToDatabase(_exampleEntity);
            }
        }
    }
}
```
{'fraction_non_alphanumeric': 0.0723781388478582, 'fraction_numerical': 0.0009847365829640572, 'mean_word_length': 1.638961038961039, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6357454', 'n_tokens_mistral': 512, 'n_tokens_neox': 482, 'n_words': 127}