-Formatting
-Build
This commit is contained in:
@@ -43,6 +43,7 @@ using System.IO;
|
||||
using Newtonsoft.Json.Tests.TestObjects;
|
||||
#if !(NETFX_CORE || DNXCORE50)
|
||||
using System.Data;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Tests.Schema
|
||||
@@ -185,7 +186,9 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
token.Validate(typeSchema, (sender, args) => { errors.Add(args.Message); });
|
||||
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
Assert.Fail("Schema generated for type '{0}' is not valid." + Environment.NewLine + string.Join(Environment.NewLine, errors.ToArray()), typeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -460,4 +463,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
@@ -645,4 +645,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
@@ -52,6 +52,7 @@ using Extensions = Newtonsoft.Json.Schema.Extensions;
|
||||
using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
#else
|
||||
using System.Linq;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Tests.Schema
|
||||
@@ -353,7 +354,9 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
protected override JsonContract CreateContract(Type objectType)
|
||||
{
|
||||
if (objectType == typeof(DirectoryInfo))
|
||||
{
|
||||
return base.CreateObjectContract(objectType);
|
||||
}
|
||||
|
||||
return base.CreateContract(objectType);
|
||||
}
|
||||
@@ -849,4 +852,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
@@ -35,6 +35,7 @@ using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
#else
|
||||
using NUnit.Framework;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Tests.Schema
|
||||
@@ -171,4 +172,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
@@ -35,6 +35,7 @@ using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
#else
|
||||
using NUnit.Framework;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Tests.Schema
|
||||
@@ -123,4 +124,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
@@ -119,5 +119,6 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#pragma warning restore 618
|
||||
@@ -39,6 +39,7 @@ using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
#else
|
||||
using NUnit.Framework;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Tests.Schema
|
||||
@@ -152,7 +153,6 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}", newJson);
|
||||
|
||||
|
||||
json = @"{
|
||||
""type"":""object"",
|
||||
""extends"":[{""type"":""string""}],
|
||||
@@ -177,7 +177,6 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}", newJson);
|
||||
|
||||
|
||||
json = @"{
|
||||
""type"":""object"",
|
||||
""extends"":[{""type"":""string""},{""type"":""object""}],
|
||||
@@ -586,4 +585,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
@@ -40,6 +40,7 @@ using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
#else
|
||||
using NUnit.Framework;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Newtonsoft.Json.Tests.Schema
|
||||
@@ -174,7 +175,9 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
{
|
||||
_stopwatch.Stop();
|
||||
if (_callback != null)
|
||||
{
|
||||
_callback(Result);
|
||||
}
|
||||
}
|
||||
|
||||
public TimeSpan Result
|
||||
@@ -183,4 +186,5 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 618
|
||||
Reference in New Issue
Block a user