From a0065bda22cac9226cc6f6d6f23b5c3e5945dce9 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Sat, 25 Nov 2017 15:19:57 +0100 Subject: [PATCH] Cleanup. --- .../MongoDb/BsonConverterTests.cs | 50 +++++++++++++------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/tests/Squidex.Infrastructure.Tests/MongoDb/BsonConverterTests.cs b/tests/Squidex.Infrastructure.Tests/MongoDb/BsonConverterTests.cs index 28ebd4b73..b9732cceb 100644 --- a/tests/Squidex.Infrastructure.Tests/MongoDb/BsonConverterTests.cs +++ b/tests/Squidex.Infrastructure.Tests/MongoDb/BsonConverterTests.cs @@ -15,52 +15,70 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; -#pragma warning disable SA1121 // Use built-in type alias - namespace Squidex.Infrastructure.MongoDb { public class BsonConverterTests { public class TestObject { + [JsonProperty] public bool Bool { get; set; } + [JsonProperty] public byte Byte { get; set; } + [JsonProperty] public byte[] Bytes { get; set; } - public string String { get; set; } + [JsonProperty] + public int Int32 { get; set; } - public string[] Strings { get; set; } + [JsonProperty] + public long Int64 { get; set; } + + [JsonProperty] + public short Int16 { get; set; } + + [JsonProperty] + public uint UInt32 { get; set; } + + [JsonProperty] + public ulong UInt64 { get; set; } + + [JsonProperty] + public ushort UInt16 { get; set; } + + [JsonProperty] + public string String { get; set; } + [JsonProperty] public float Float32 { get; set; } + [JsonProperty] public double Float64 { get; set; } + [JsonProperty] + public string[] Strings { get; set; } + + [JsonProperty] public Uri Uri { get; set; } + [JsonProperty] public Guid Guid { get; set; } + [JsonProperty] public TimeSpan TimeSpan { get; set; } + [JsonProperty] public DateTime DateTime { get; set; } + [JsonProperty] public DateTimeOffset DateTimeOffset { get; set; } - public Int64 Int64 { get; set; } - - public Int32 Int32 { get; set; } - - public Int16 Int16 { get; set; } - - public UInt64 UInt64 { get; set; } - - public UInt32 UInt32 { get; set; } - - public UInt16 UInt16 { get; set; } - + [JsonProperty] public TestObject Nested { get; set; } + [JsonProperty] public TestObject[] NestedArray { get; set; } public static TestObject CreateWithValues(bool nested = true)