package Ġcom . ro bo h orse . rob op oj ogener ator . deleg ates Ċ Ċ import Ġcom . ro bo h orse . rob op oj ogener ator . controllers . Core Generator Action Controller Ċ import Ġcom . ro bo h orse . rob op oj ogener ator . errors . custom . Path Exception Ċ import Ġcom . ro bo h orse . rob op oj ogener ator . models .* Ċ import Ġjavax . inject . Inject Ċ Ċ open Ġclass ĠRemote Test Creator Delegate Ġ@ Inject Ġconstructor () Ġ: ĠCore Creator Delegate () Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġp O JO Generation Delegate : ĠPO JO Generation Delegate ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġmapper Test Generator Delegate : ĠMapper Test Generator Delegate ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġfactory Generation Delegate : ĠFactory Generator Delegate ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġfile Template Writer Delegate : ĠFile Template Writer Delegate ĊĊĠĠĠ Ġfun Ġrun Generation Task ( project Model : ĠProject Model , Ġcore Generator Model : ĠCore Generator Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġgenerate Mapper Test ( project Model , Ġcore Generator Model ) ĊĠĠĠĠĠĠĠ Ġgenerate Factory ( project Model , Ġcore Generator Model ) ĊĠĠĠĠĠĠĠ Ġgenerate Remote Impl Test ( project Model , Ġcore Generator Model ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Remote Impl Test ( project Model : ĠProject Model , Ġcore Generator Model : ĠCore Generator Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpath Ġ= Ġcore Generator Model . remote Test Path Ġ?: Ġthrow ĠPath Exception () ĊĠĠĠĠĠĠĠ Ġval Ġre gen Project Model Ġ= Ġre gen Project Model ( project Model , Ġpath ) ĊĊĠĠĠĠĠĠĠ Ġval Ġfile Template Manager Ġ= Ġfile Template Writer Delegate . getInstance ( reg en Project Model . project ) ĊĠĠĠĠĠĠĠ Ġval ĠclassName Ġ= Ġcore Generator Model . root ClassName ĊĊĠĠĠĠĠĠĠ Ġval Ġtemplate Name Ġ= Ġ" Remote Impl Test " ĊĠĠĠĠĠĠĠ Ġval ĠfileName Suffix Ġ= Ġ" Remote Impl Test " ĊĊĠĠĠĠĠĠĠ Ġval Ġtemplate Properties Ġ= Ġfile Template Manager . default Properties . also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit [" CLASS _ NAME "] Ġ= ĠclassName ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġfile Template Writer Delegate . write Template ( reg en Project Model . directory , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠclassName Ġ+ ĠfileName Suffix , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtemplate Name , Ġtemplate Properties ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Factory ( project Model : ĠProject Model , Ġcore Generator Model : ĠCore Generator Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpath Ġ= Ġcore Generator Model . remote Test Path Ġ+ ĠCore Generator Action Controller . FACTORY _ PATH ĊĠĠĠĠĠĠĠ Ġval Ġre gen Project Model Ġ= Ġre gen Project Model ( project Model , Ġpath ) ĊĊĠĠĠĠĠĠĠ Ġval Ġgeneration Model Ġ= ĠGeneration Model . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setContent ( core Generator Model . content ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Root ClassName ( core Generator Model . root ClassName ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġfactory Generator Model Ġ= ĠFactory Generator Model ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠfileName Suffix Ġ= Ġ" Factory ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtemplate Name Ġ= Ġ" Remote Factory ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġremote Ġ= Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcache Ġ= Ġfalse , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdata Ġ= Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdomain Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġfactory Generation Delegate . run Generation Task ( generation Model , Ġre gen Project Model , Ġfactory Generator Model ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Mapper Test ( project Model : ĠProject Model , Ġcore Generator Model : ĠCore Generator Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpath Ġ= Ġcore Generator Model . remote Test Path Ġ+ ĠCore Generator Action Controller . MAP PER _ PATH ĊĠĠĠĠĠĠĠ Ġval Ġre gen Project Model Ġ= Ġre gen Project Model ( project Model , Ġpath ) ĊĊĠĠĠĠĠĠĠ Ġval Ġgeneration Model Ġ= ĠGeneration Model . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setContent ( core Generator Model . content ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Root ClassName ( core Generator Model . root ClassName ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġfrom Mapper Test Generator Model Ġ= ĠMapper Test Generator Model ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfrom Ġ= Ġ" model ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġto Ġ= Ġ" entity ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠfileName Suffix Ġ= Ġ" Entity Mapper Test ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtemplate Name Ġ= Ġ" From Remote Mapper Test ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠclassName Suffix Ġ= Ġ" Entity Mapper ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis Nullable Ġ= Ġtrue ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġmapper Test Generator Delegate . run Generation Task ( generation Model , Ġre gen Project Model , Ġfrom Mapper Test Generator Model ) ĊĊĠĠĠĠĠĠĠ Ġval Ġto Mapper Test Generator Model Ġ= ĠMapper Test Generator Model ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfrom Ġ= Ġ" entity ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġto Ġ= Ġ" model ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠfileName Suffix Ġ= Ġ" Model Mapper Test ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtemplate Name Ġ= Ġ" To Remote Mapper Test ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠclassName Suffix Ġ= Ġ" Entity Mapper ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis Nullable Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġmapper Test Generator Delegate . run Generation Task ( generation Model , Ġre gen Project Model , Ġto Mapper Test Generator Model ) ĊĠĠĠ Ġ} Ċ }