-WinRT build

This commit is contained in:
James Newton-King
2013-12-08 13:37:13 +13:00
parent 7e9824c5f6
commit c7fd4d5e29
8 changed files with 390 additions and 383 deletions
@@ -33,13 +33,13 @@ using NUnit.Framework;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
using Windows.Data.Json;
using System.IO;
using System.Diagnostics;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Linq;
#endif
namespace Newtonsoft.Json.Tests.Converters
{
@@ -5,7 +5,13 @@ using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Linq.JsonPath;
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
namespace Newtonsoft.Json.Tests.Linq.JsonPath
{
@@ -142,9 +142,11 @@
<Compile Include="Linq\JArrayTests.cs" />
<Compile Include="Linq\JConstructorTests.cs" />
<Compile Include="Linq\JObjectTests.cs" />
<Compile Include="Linq\JPathTests.cs" />
<Compile Include="Linq\JPropertyTests.cs" />
<Compile Include="Linq\JRawTests.cs" />
<Compile Include="Linq\JsonPath\JPathExecuteTests.cs" />
<Compile Include="Linq\JsonPath\JPathParseTests.cs" />
<Compile Include="Linq\JsonPath\QueryExpressionTests.cs" />
<Compile Include="Linq\JTokenEqualityComparerTests.cs" />
<Compile Include="Linq\JTokenReaderTest.cs" />
<Compile Include="Linq\JTokenTests.cs" />
@@ -177,7 +179,6 @@
<Compile Include="Serialization\TraceWriterTests.cs" />
<Compile Include="Serialization\TypeNameHandlingTests.cs" />
<Compile Include="Serialization\WebApiIntegrationTests.cs" />
<Compile Include="SilverlightTests.cs" />
<Compile Include="TestFixtureBase.cs" />
<Compile Include="TestObjects\AbstractGenericBase.cs" />
<Compile Include="TestObjects\ArgumentConverterPrecedenceClassConverter.cs" />
@@ -9471,28 +9471,6 @@ Parameter name: value",
]", json);
}
public class Foo2
{
public string Name { get; set; }
}
[Test]
[Ignore]
public void SerializeMultipleObjectsFromStream()
{
StringReader sr = new StringReader(@"{ ""name"": ""bar"" }{ ""name"": ""baz"" }");
var reader1 = new JsonTextReader(sr);
var serializer1 = new JsonSerializer { };
var foo1 = serializer1.Deserialize<Foo2>(reader1);
Assert.AreEqual("bar", foo1.Name);
var reader2 = new JsonTextReader(sr);
var serializer2 = new JsonSerializer { };
var foo2 = serializer2.Deserialize<Foo2>(reader2);
Assert.AreEqual("baz", foo2.Name);
}
#if !(PORTABLE || PORTABLE40 || NETFX_CORE)
[Test]
public void SerializeDictionaryWithStructKey()