Changed
-
WithAdditionalAttributes
Fake configuration option replace byWithAttributes
(#436):var foo = A.Fake<IFoo>(x => x.WithAttributes(() => new FooAttribute()));
Removed from public API
IStartConfiguration<T>
. It had been always been for internal use only. (#864)
New
-
Support for .NET Standard 1.6, including .NET Core 1.0 (#531)
Some functionality available in the .NET 4.0 assembly is not available in the .NET Standard assembly.
In particular, note that:- Fakes will not be binary serializable
SelfInitializedFakes
(e.g.fakeService = A.Fake<ILibraryService>(options => options.Wrapping(realService).RecordedBy(recorder)
) are not supported
-
New syntax (
Then
) to configure successive calls to the same member. (#803):A.CallTo(() => foo.Bar()).Returns(0).Twice() .Then.Throws<InvalidOperationException>().Once() .Then.Returns(1);
Fixed
- Faking a type multiple times and applying different attributes to the fakes now correctly generates different fake types. (#436)
With special thanks for contributions to this release from:
- Jeremy Meng - @jeremymeng, who performed the lion's share of the .NET Core conversion
- Christian Merat - @cmerat
- Jonathon Rossi - @jonorossi