File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1- namespace TestStack . Dossier
1+ using TestStack . Dossier . Factories ;
2+
3+ namespace TestStack . Dossier
24{
35 /// <summary>
46 /// A stand-alone class for building objects on the fly.
79 public class Builder < T > : TestDataBuilder < T , Builder < T > >
810 where T : class
911 {
12+ /// <inheritdoc />
13+ public Builder ( )
14+ : this ( new AllPropertiesFactory ( ) )
15+ {
16+
17+ }
18+
19+ /// <inheritdoc />
20+ public Builder ( IFactory factory )
21+ : base ( factory ) { }
22+
1023 /// <summary>
1124 /// Initialises a new Builder.
1225 /// </summary>
1326 /// <returns>Returns a new instance of a Builder for the type of T</returns>
14- public static Builder < T > CreateNew ( )
27+ public static Builder < T > CreateNew ( IFactory factory = null )
1528 {
16- return new Builder < T > ( ) ;
29+ if ( factory == null )
30+ {
31+ factory = new AllPropertiesFactory ( ) ;
32+ }
33+ return new Builder < T > ( factory ) ;
1734 }
1835 }
1936}
You can’t perform that action at this time.
0 commit comments