This commit is contained in:
Michael Fanning 2017-09-06 15:09:01 -07:00
Родитель d03b5dc20a
Коммит e65f42dc96
5 изменённых файлов: 15 добавлений и 6 удалений

Просмотреть файл

@ -30,10 +30,6 @@
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sarif, Version=1.6.0.0, Culture=neutral, PublicKeyToken=6eeb4570dcdece70, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.6.0\lib\net45\Sarif.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll</HintPath>

Просмотреть файл

@ -199,7 +199,12 @@ namespace Microsoft.Json.Schema.UnitTests
};
action.ShouldThrow<SchemaValidationException>()
.Where(ex => (ex.WrappedExceptions != null ? ex.WrappedExceptions.Count() == test.NumErrors : 1 == test.NumErrors));
.Where(ex => (ex.WrappedExceptions != null
? ex.WrappedExceptions.Count() == test.NumErrors
: 1 == test.NumErrors) &&
ex.JToken != null &&
ex.ErrorNumber > 0 &&
ex.Args != null);
}
}
}

Просмотреть файл

@ -3,7 +3,6 @@
<package id="FluentAssertions" version="4.6.1" targetFramework="net452" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="Sarif.Sdk" version="1.6.0" targetFramework="net451" />
<package id="System.Collections" version="4.0.0" targetFramework="net452" />
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net451" />
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net452" />

Просмотреть файл

@ -17,6 +17,12 @@ namespace Microsoft.Json.Schema.ValidationSuiteTests
{
public class ValidationSuiteTests
{
// This test runs the JSON Schema Test Suite. Since this implementation
// of JSON Schema is not quite complete, a few of the tests in the suite
// fail. If you want to fill in some of the missing pieces, uncomment
// this test to verify your changes. When you're done, if the
// implementation is still incomplete, comment it out again.
//
//[Theory(DisplayName = nameof(ValidationSuite))]
[ClassData(typeof(ValidationData))]
public void ValidationSuite(TestData testData)

Просмотреть файл

@ -80,6 +80,9 @@ namespace Microsoft.Json.Schema
public SchemaValidationException(JToken jToken, ErrorNumber errorNumber, params object[] args)
: this()
{
JToken = jToken;
ErrorNumber = errorNumber;
Args = args;
}
/// <summ