How to AutoFixture.CreateAnonymous<>() on class with internal ctor
I have done something like the following

    public class Foo
    {
        public Bar { get; set; }
    }
  
    public class Bar
    {
        internal Bar(string id)
        {}
    }

    public static class Bars
    {
         public static class TypeOne
         {
               public static readonly SimpleBar = new Bar("id-for-type1-simple-bar");
         }
    }

now, I added an `InternalsVisibleTo` to my in my unit-test-assembly to be able to access the internal Bar ctor and then I did:

    var fixture = new Fixture();
    fixture.Register(() => new Bar(fixture.CreateAnonymous<string>()));
    var foo = fixture.CreateAnonymous<Foo>();

Question:  
Was that the "right" way to utilize AutoFixture or is there a better one? 
How to AutoFixture.CreateAnonymous<>() on class with internal ctor
===

I have done something like the following

    public class Foo
    {
        public Bar { get; set; }
    }
  
    public class Bar
    {
        internal Bar(string id)
        {}
    }

    public static class Bars
    {
         public static class TypeOne
         {
               public static readonly SimpleBar = new Bar("id-for-type1-simple-bar");
         }
    }

now, I added an `InternalsVisibleTo` to my in my unit-test-assembly to be able to access the internal Bar ctor and then I did:

    var fixture = new Fixture();
    fixture.Register(() => new Bar(fixture.CreateAnonymous<string>()));
    var foo = fixture.CreateAnonymous<Foo>();

Question:  
Was that the "right" way to utilize AutoFixture or is there a better one? 