Skip to content

Commit ef31b2f

Browse files
committed
Readme tweaks
1 parent 6d265e5 commit ef31b2f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ How do I get started?
1212

1313
1. `Install-Package NTestDataBuilder`
1414
2. Create a builder class for one of your objects, e.g. if you have a customer:
15-
1615
```c#
1716
// Customer.cs
1817
@@ -83,13 +82,10 @@ How do I get started?
8382
}
8483
}
8584
```
86-
8785
3. Use the builder in a test, e.g.
88-
8986
```c#
9087
var customer = new CustomerBuilder().WithFirstName("Robert").Build();
9188
```
92-
9389
4. Consider using the Object Mother pattern in combination with the builders, see [my blog post](http://robdmoore.id.au/blog/2013/05/26/test-data-generation-the-right-way-object-mother-test-data-builders-nsubstitute-nbuilder/) for a description of how I use this library.
9490

9591
How can I create a list of entities using my builders?
@@ -167,6 +163,8 @@ If you need to alter the proxy before calling `Build` to add complex behaviours
167163
var years = customer.CustomerForHowManyYears(DateTime.Now); // 10
168164
```
169165

166+
*Remember that when using proxy objects of real classes that you need to mark properties and methods as virtual and have a protected empty constructor.*
167+
170168
Why does NTestDataBuilder have NSubstitute and NBuilder as dependencies?
171169
------------------------------------------------------------------------
172170

0 commit comments

Comments
 (0)