-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out serialization support #1499
Figure out serialization support #1499
Conversation
fd96000
to
600962d
Compare
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'"> | ||
<DefineConstants>$(DefineConstants);FEATURE_BINARY_SERIALIZATION</DefineConstants> | ||
</PropertyGroup> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess removing this isn't required. It's just that we don't use it anymore, so I figured I might as well clean up.
@@ -17,12 +17,13 @@ | |||
<ProjectReference Include="..\..\tests\FakeItEasy.Tests\FakeItEasy.Tests.csproj" /> | |||
</ItemGroup> | |||
|
|||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'"> | |||
<Compile Remove="SerializationSpecs.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not married to using Remove
instead of relying on FEATURE_BINARY_SERIALIZATION
, so I'm happy to restore the constant if you like. It was just a thing to try out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me
// Assert | ||
collection.Should().BeBinarySerializable(); | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only test (except for the weird ones that tested the only-in-the-test-project-DummyException
) that I didn't take to the specs. Because once I saw that we can't serialize a fake as soon as it's been called, there didn't seem to be much point in checking that we could serialize a collection of arguments.
600962d
to
6f83e59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Waiting for your answer in #1498 before merging
@@ -17,12 +17,13 @@ | |||
<ProjectReference Include="..\..\tests\FakeItEasy.Tests\FakeItEasy.Tests.csproj" /> | |||
</ItemGroup> | |||
|
|||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'"> | |||
<Compile Remove="SerializationSpecs.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me
6f83e59
to
6076a5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the test we talked about and rebased.
Thanks, @blairconrad! |
This change has been released in FakeItEasy 5.0.0. |
As an outgrowth of recent discussions in #1498, I thought it would be nice to figure out what support we have for serialization, so I consolidated some tests and added a few (and removed one). I think this will help us reason about how to proceed with serialization support.