Closed
Description
On my machine the Serialize_Should_serialize_World
and Serialize_Should_serialize_Entities
tests fail as the TextSerializer reads values with an invariant culture but written with the current culture.
It can be fixed by using a thin wrapper over StreamWriter
overriding the FormatProvider
property (in the StreamWriterWrapper
class):
internal sealed class InvariantCultureStreamWriter : StreamWriter
{
public InvariantCultureStreamWriter(Stream stream, Encoding encoding, int bufferSize, bool leaveOpen) : base(stream, encoding, bufferSize, leaveOpen)
{
}
public override IFormatProvider FormatProvider => global::System.Globalization.CultureInfo.InvariantCulture;
}