mirror of
https://github.com/netchx/netch.git
synced 2026-03-16 17:53:17 +08:00
26 lines
554 B
C#
26 lines
554 B
C#
using Netch;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace UnitTest
|
|
{
|
|
public class TestBase
|
|
{
|
|
private readonly JsonSerializerSettings _serializerSettings = new()
|
|
{
|
|
Formatting = Formatting.Indented,
|
|
NullValueHandling = NullValueHandling.Ignore
|
|
};
|
|
|
|
protected TestBase()
|
|
{
|
|
#if DEBUG
|
|
Global.Testing = true;
|
|
#endif
|
|
}
|
|
|
|
protected string JsonSerializerFormatted(object o)
|
|
{
|
|
return JsonConvert.SerializeObject(o, _serializerSettings);
|
|
}
|
|
}
|
|
} |