Skip to content

Commit 8959bd4

Browse files
committed
Added breaking changes note about anonymous value generation by default
1 parent 49f0df5 commit 8959bd4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

BREAKING_CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ NTestDataBuilder Breaking Changes
44
Version 2.0.0
55
-------------
66

7+
When you don't `Set` a default value for a property that you later `Get` in your builder it will now generate an anonymous value for that property rather than throwing an exception.
8+
9+
### Reason
10+
11+
This is part of the work to make anonymous values a first class citizen of the library and to make it easier and quicker to tersely set up builders. This avoids the need to have boilerplate `Set` calls in your builder constructor and also means that when you generate a list of objects each object will have a different value (by default).
12+
13+
### Fix
14+
15+
The old behaviour of throwing an exception if a value hasn't been specified is no longer supported - use NTestDataBuilder version 1 if you want that or raise an issue on GitHub to explain your use case.
16+
17+
If you want to fix a static value for a property then by all means you can still use `Set` calls in your builder constructor. If you aren't happy with the default anonymous value that is generated for a property you can use the `Any` property to generate a value from a different equivalence class in combination with a `Set` call in your builder constructor.
18+
19+
Version 2.0.0
20+
-------------
21+
722
The way that lists are generated no longer uses NBuilder - the new syntax is backwards compatible with NBuilder except that the namespace you need to include is different. You can also refactor your list generation to be a lot more terse, but that is optional. Any `BuildList` extension methods you created will now need to be deleted since they are no longer needed.
823

924
### Reason

0 commit comments

Comments
 (0)