Updating tests to run on dnxcore50
This commit is contained in:
parent
b09bdc08f4
commit
60f5fd591e
|
|
@ -151,9 +151,9 @@ namespace Microsoft.AspNet.JsonPatch.Test.Dynamic
|
||||||
{
|
{
|
||||||
dynamic doc = new ExpandoObject();
|
dynamic doc = new ExpandoObject();
|
||||||
doc.SimpleDTO = new SimpleDTO()
|
doc.SimpleDTO = new SimpleDTO()
|
||||||
{
|
{
|
||||||
StringProperty = "A"
|
StringProperty = "A"
|
||||||
};
|
};
|
||||||
|
|
||||||
// create patch
|
// create patch
|
||||||
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
||||||
|
|
@ -192,9 +192,9 @@ namespace Microsoft.AspNet.JsonPatch.Test.Dynamic
|
||||||
{
|
{
|
||||||
dynamic doc = new ExpandoObject();
|
dynamic doc = new ExpandoObject();
|
||||||
doc.SimpleDTO = new SimpleDTO()
|
doc.SimpleDTO = new SimpleDTO()
|
||||||
{
|
{
|
||||||
IntegerList = new List<int>() { 1, 2, 3 }
|
IntegerList = new List<int>() { 1, 2, 3 }
|
||||||
};
|
};
|
||||||
|
|
||||||
// create patch
|
// create patch
|
||||||
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
||||||
|
|
@ -234,9 +234,9 @@ namespace Microsoft.AspNet.JsonPatch.Test.Dynamic
|
||||||
{
|
{
|
||||||
dynamic doc = new ExpandoObject();
|
dynamic doc = new ExpandoObject();
|
||||||
doc.SimpleDTO = new SimpleDTO()
|
doc.SimpleDTO = new SimpleDTO()
|
||||||
{
|
{
|
||||||
IntegerList = new List<int>() { 1, 2, 3 }
|
IntegerList = new List<int>() { 1, 2, 3 }
|
||||||
};
|
};
|
||||||
|
|
||||||
// create patch
|
// create patch
|
||||||
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
||||||
|
|
@ -259,9 +259,9 @@ namespace Microsoft.AspNet.JsonPatch.Test.Dynamic
|
||||||
{
|
{
|
||||||
dynamic doc = new ExpandoObject();
|
dynamic doc = new ExpandoObject();
|
||||||
doc.SimpleDTO = new SimpleDTO()
|
doc.SimpleDTO = new SimpleDTO()
|
||||||
{
|
{
|
||||||
IntegerList = new List<int>() { 1, 2, 3 }
|
IntegerList = new List<int>() { 1, 2, 3 }
|
||||||
};
|
};
|
||||||
|
|
||||||
// create patch
|
// create patch
|
||||||
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
||||||
|
|
@ -284,9 +284,9 @@ namespace Microsoft.AspNet.JsonPatch.Test.Dynamic
|
||||||
{
|
{
|
||||||
dynamic doc = new ExpandoObject();
|
dynamic doc = new ExpandoObject();
|
||||||
doc.SimpleDTO = new SimpleDTO()
|
doc.SimpleDTO = new SimpleDTO()
|
||||||
{
|
{
|
||||||
IntegerList = new List<int>() { 1, 2, 3 }
|
IntegerList = new List<int>() { 1, 2, 3 }
|
||||||
};
|
};
|
||||||
|
|
||||||
// create patch
|
// create patch
|
||||||
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
JsonPatchDocument patchDoc = new JsonPatchDocument();
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNet.JsonPatch.Exceptions;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Microsoft.AspNet.JsonPatch.Exceptions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.JsonPatch.Test
|
namespace Microsoft.AspNet.JsonPatch.Test
|
||||||
|
|
@ -1371,7 +1370,7 @@ namespace Microsoft.AspNet.JsonPatch.Test
|
||||||
var logger = new TestErrorLogger<SimpleDTOWithNestedDTO>();
|
var logger = new TestErrorLogger<SimpleDTOWithNestedDTO>();
|
||||||
|
|
||||||
|
|
||||||
patchDoc.ApplyTo(doc, logger.LogErrorMessage);
|
patchDoc.ApplyTo(doc, logger.LogErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.JsonPatch.Test
|
namespace Microsoft.AspNet.JsonPatch.Test
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
namespace Microsoft.AspNet.JsonPatch.Test
|
namespace Microsoft.AspNet.JsonPatch.Test
|
||||||
{
|
{
|
||||||
public class TestErrorLogger<T> where T: class
|
public class TestErrorLogger<T> where T : class
|
||||||
{
|
{
|
||||||
public string ErrorMessage { get; set; }
|
public string ErrorMessage { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,26 @@
|
||||||
{
|
{
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"warningsAsErrors": true
|
"warningsAsErrors": true
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.AspNet.JsonPatch": "1.0.0-*",
|
||||||
|
"Microsoft.AspNet.Testing": "1.0.0-*",
|
||||||
|
"Newtonsoft.Json": "6.0.6",
|
||||||
|
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||||
|
},
|
||||||
|
"commands": {
|
||||||
|
"test": "xunit.runner.aspnet"
|
||||||
|
},
|
||||||
|
"frameworks": {
|
||||||
|
"dnx451": {
|
||||||
|
"dependencies": {
|
||||||
|
"Moq": "4.2.1312.1622"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dnxcore50": {
|
||||||
"Microsoft.AspNet.JsonPatch": "1.0.0-*",
|
"dependencies": {
|
||||||
"Microsoft.AspNet.Testing": "1.0.0-*",
|
"moq.netcore": "4.4.0-beta8"
|
||||||
"Moq": "4.2.1312.1622",
|
}
|
||||||
"Newtonsoft.Json": "6.0.6",
|
|
||||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"test": "xunit.runner.aspnet"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
|
||||||
"dnx451": { }
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue