It's possible to use external sources to generate names?

31 views
Skip to first unread message

Otávio Garcia

unread,
Dec 13, 2013, 12:15:28 PM12/13/13
to fixture...@googlegroups.com
It's possible to use external sources, like a file with a list of available names, to generate a field?

Thanks

Arthur Hirata

unread,
Dec 13, 2013, 3:01:03 PM12/13/13
to fixture...@googlegroups.com
I'm not sure if I understood you correctly. You want an external file to be used as a source for the values generated by the name(), is that it?

If so, you can. But I have just found a small limitation with that approach.

bfgex (the framework that is used to generate the names) uses 3 files: /male_names, /female_names, /surnames. The files are loaded as defined by Class.getResourceAsStream(String name). So it should work just fine if you create your own files.

The problem is that, in the current version, it will choose a length between 3 and 10 and then look for a name with that length. So, in order to generate the names properly, you will have to provide at least 1 name for each length in each file.

Let me know if this is what you had in mind.




Em Sexta-feira, 13 de Dezembro de 2013 15:15, Otávio Garcia <ota...@otavio.com.br> escreveu:
It's possible to use external sources, like a file with a list of available names, to generate a field?

Thanks
--
Você está recebendo esta mensagem porque se inscreveu no grupo "fixture-factory" dos Grupos do Google.
Para cancelar a inscrição neste grupo e parar de receber seus e-mails, envie um e-mail para fixture-facto...@googlegroups.com.
Para obter mais opções, acesse https://groups.google.com/groups/opt_out.


Otávio Garcia

unread,
Dec 13, 2013, 3:16:02 PM12/13/13
to fixture...@googlegroups.com
Hirata, thanks for your reply. I think that this is enough for me.

I'll take a look soon.

Thanks :)
Reply all
Reply to author
Forward
0 new messages