コード例 #1
0
 private static Faker <SectorOwnerHierarchy> GetGenerator(List <string> controllers = null)
 {
     return(new Faker <SectorOwnerHierarchy>()
            .CustomInstantiator(
                _ => new SectorOwnerHierarchy(
                    controllers ?? ControllerPositionFactory.GetIdentifierList(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <SectorAlternateOwnerHierarchy> GetGenerator(List <string> positions = null)
 {
     return(new Faker <SectorAlternateOwnerHierarchy>()
            .CustomInstantiator(
                f => new SectorAlternateOwnerHierarchy(
                    f.Random.String2(4),
                    positions ?? ControllerPositionFactory.GetIdentifierList(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }