Open GoogleCodeExporter opened 8 years ago
Hey,
I think what you are proposing is some extra support for mocking complex value
objects (or entities). Not sure if it is a good idea. Wouldn't you prefer to
have
fluent builders for building up the state?
//Instead:
Person person = mock(person, PersonAnswerMap.class)
//You do:
Person person = new PersonBuilder().build();
//or
Person person = new PersonBuilder().withDefaults().build();
//In case you want to override some defaults:
Person person = new PersonBuilder().name("foo").id(102).build();
Also, have a look at:
http://code.google.com/p/fluent-builders-generator-eclipse-plugin/
Original comment by szcze...@gmail.com
on 24 May 2010 at 6:06
Hey,
I think what you are proposing is some extra support for mocking complex value
objects (or entities). Not sure if it is a good idea. Wouldn't you prefer to
have
fluent builders for building up the state?
//Instead:
Person person = mock(person, PersonAnswerMap.class)
//You do:
Person person = new PersonBuilder().build();
//or
Person person = new PersonBuilder().withDefaults().build();
//In case you want to override some defaults:
Person person = new PersonBuilder().name("foo").id(102).build();
Also, have a look at:
http://code.google.com/p/fluent-builders-generator-eclipse-plugin/
Original comment by szcze...@gmail.com
on 24 May 2010 at 6:06
[deleted comment]
Original comment by szcze...@gmail.com
on 30 May 2010 at 6:24
Original issue reported on code.google.com by
javidja...@gmail.com
on 5 May 2010 at 7:51