-Tests
This commit is contained in:
+8
-8
@@ -83,7 +83,7 @@ task Package -depends Build {
|
||||
$name = $build.TestsName
|
||||
$finalDir = $build.FinalDir
|
||||
|
||||
robocopy "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" $workingDir\Package\Bin\$finalDir *.dll *.pdb *.xml /NP /XO /XF *.CodeAnalysisLog.xml | Out-Default
|
||||
robocopy "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" $workingDir\Package\Bin\$finalDir *.dll *.pdb *.xml /NFL /NDL /NJS /NC /NS /NP /XO /XF *.CodeAnalysisLog.xml | Out-Default
|
||||
}
|
||||
|
||||
if ($buildNuGet)
|
||||
@@ -115,12 +115,12 @@ task Package -depends Build {
|
||||
|
||||
foreach ($frameworkDir in $frameworkDirs)
|
||||
{
|
||||
robocopy "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" $workingDir\NuGet\lib\$frameworkDir *.dll *.pdb *.xml /NP /XO /XF *.CodeAnalysisLog.xml | Out-Default
|
||||
robocopy "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" $workingDir\NuGet\lib\$frameworkDir *.dll *.pdb *.xml /NFL /NDL /NJS /NC /NS /NP /XO /XF *.CodeAnalysisLog.xml | Out-Default
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
robocopy $sourceDir $workingDir\NuGet\src *.cs /S /NP /XD Newtonsoft.Json.Tests Newtonsoft.Json.TestConsole obj | Out-Default
|
||||
robocopy $sourceDir $workingDir\NuGet\src *.cs /S /NFL /NDL /NJS /NC /NS /NP /XD Newtonsoft.Json.Tests Newtonsoft.Json.TestConsole obj | Out-Default
|
||||
|
||||
exec { .\Tools\NuGet\NuGet.exe pack $nuspecPath -Symbols }
|
||||
move -Path .\*.nupkg -Destination $workingDir\NuGet
|
||||
@@ -149,10 +149,10 @@ task Package -depends Build {
|
||||
# exclude package directories but keep packages\repositories.config
|
||||
$packageDirs = gci $sourceDir\packages | where {$_.PsIsContainer} | Select -ExpandProperty Name
|
||||
|
||||
robocopy $sourceDir $workingDir\Package\Source\Src /MIR /NP /XD bin obj TestResults AppPackages $packageDirs /XF *.suo *.user | Out-Default
|
||||
robocopy $buildDir $workingDir\Package\Source\Build /MIR /NP /XF runbuild.txt | Out-Default
|
||||
robocopy $docDir $workingDir\Package\Source\Doc /MIR /NP | Out-Default
|
||||
robocopy $toolsDir $workingDir\Package\Source\Tools /MIR /NP | Out-Default
|
||||
robocopy $sourceDir $workingDir\Package\Source\Src /MIR /NFL /NDL /NJS /NC /NS /NP /XD bin obj TestResults AppPackages $packageDirs /XF *.suo *.user | Out-Default
|
||||
robocopy $buildDir $workingDir\Package\Source\Build /MIR /NFL /NDL /NJS /NC /NS /NP /XF runbuild.txt | Out-Default
|
||||
robocopy $docDir $workingDir\Package\Source\Doc /MIR /NFL /NDL /NJS /NC /NS /NP | Out-Default
|
||||
robocopy $toolsDir $workingDir\Package\Source\Tools /MIR /NFL /NDL /NJS /NC /NS /NP | Out-Default
|
||||
|
||||
exec { .\Tools\7-zip\7za.exe a -tzip $workingDir\$zipFileName $workingDir\Package\* | Out-Default } "Error zipping"
|
||||
}
|
||||
@@ -223,7 +223,7 @@ function NUnitTests($build)
|
||||
|
||||
Write-Host -ForegroundColor Green "Copying test assembly $name to deployed directory"
|
||||
Write-Host
|
||||
robocopy ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir" $workingDir\Deployed\Bin\$finalDir /MIR /NP /XO | Out-Default
|
||||
robocopy ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir" $workingDir\Deployed\Bin\$finalDir /MIR /NFL /NDL /NJS /NC /NS /NP /XO | Out-Default
|
||||
|
||||
Copy-Item -Path ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir\Newtonsoft.Json.Tests.dll" -Destination $workingDir\Deployed\Bin\$finalDir\
|
||||
|
||||
|
||||
@@ -730,7 +730,7 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
|
||||
JObject o = (JObject)JObject.ReadFrom(new BsonReader(new MemoryStream(ms.ToArray())));
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""Regex"": ""/(hi)/iux""
|
||||
}", o.ToString());
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
|
||||
string json = JsonConvert.SerializeObject(d, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""result"": {
|
||||
""@xp_0:end"": ""2014-08-15 13:12:11.9184"",
|
||||
""@xp_0:start"": ""2014-08-15 13:11:49.3140"",
|
||||
@@ -897,7 +897,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
|
||||
string jsonText = SerializeXmlNode(doc);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""?xml"": {
|
||||
""@version"": ""1.0"",
|
||||
""@standalone"": ""no""
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace Newtonsoft.Json.Tests
|
||||
// "Date": new Date(1401796800000)
|
||||
// }
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""Name"": ""Serialize All The Things"",
|
||||
""Date"": new Date(
|
||||
1401796800000
|
||||
@@ -317,7 +317,7 @@ namespace Newtonsoft.Json.Tests
|
||||
// "Name": "Mike Manager"
|
||||
// }
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""Reportees"": [
|
||||
{
|
||||
""Name"": ""Arnie Admin""
|
||||
@@ -374,7 +374,7 @@ namespace Newtonsoft.Json.Tests
|
||||
// ]
|
||||
// }
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$id"": ""1"",
|
||||
""$type"": ""Newtonsoft.Json.Tests.DemoTests+Manager, Newtonsoft.Json.Tests"",
|
||||
""Reportees"": [
|
||||
@@ -570,7 +570,7 @@ namespace Newtonsoft.Json.Tests
|
||||
// ]
|
||||
// }
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""FirstName"": ""John"",
|
||||
""LastName"": ""Smith"",
|
||||
""Enabled"": true,
|
||||
|
||||
@@ -635,7 +635,7 @@ Parameter name: arrayIndex");
|
||||
moss["Department"] = new JValue("IT");
|
||||
moss["JobTitle"] = new JValue("Support");
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""FirstName"": ""Maurice"",
|
||||
""LastName"": ""Moss"",
|
||||
""BirthDate"": ""1977-12-30T00:00:00"",
|
||||
@@ -650,7 +650,7 @@ Parameter name: arrayIndex");
|
||||
jen["Department"] = "IT";
|
||||
jen["JobTitle"] = "Manager";
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""FirstName"": ""Jen"",
|
||||
""LastName"": ""Barber"",
|
||||
""BirthDate"": ""1978-03-15T00:00:00"",
|
||||
|
||||
@@ -1109,7 +1109,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
|
||||
JArray a2 = (JArray)a.DeepClone();
|
||||
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
5,
|
||||
[
|
||||
1
|
||||
|
||||
@@ -260,7 +260,7 @@ undefined
|
||||
|
||||
foreach (JObject friend in items)
|
||||
{
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""name"": ""value!""
|
||||
}", friend.ToString());
|
||||
}
|
||||
@@ -715,7 +715,7 @@ keyword such as type of business.""
|
||||
from c in p.Categories
|
||||
select new JValue(c)))))))));
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""channel"": {
|
||||
""title"": ""James Newton-King"",
|
||||
""link"": ""http://james.newtonking.com"",
|
||||
@@ -987,7 +987,7 @@ keyword such as type of business.""
|
||||
}
|
||||
});
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""channel"": {
|
||||
""title"": ""James Newton-King"",
|
||||
""link"": ""http://james.newtonking.com"",
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
TypeNameAssemblyFormat = FormatterAssemblyStyle.Full
|
||||
});
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$type"": ""System.Dynamic.ExpandoObject, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"",
|
||||
""Text"": ""Text!"",
|
||||
""Integer"": 2147483647,
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
|
||||
string json = JsonConvert.SerializeObject(e, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""extensionData1"": [
|
||||
1,
|
||||
2,
|
||||
|
||||
@@ -2227,7 +2227,7 @@ keyword such as type of business.""
|
||||
|
||||
string json = JsonConvert.SerializeObject(c, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""DefaultConverter"": ""1970-01-01T00:00:00Z"",
|
||||
""MemberConverter"": ""1970-01-01T00:00:00Z""
|
||||
}", json);
|
||||
@@ -5684,7 +5684,7 @@ Path '', line 1, position 1.");
|
||||
// ""nonVirtualMember"": ""NonVirtualMember!""
|
||||
//}", result);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""virtualMember"": ""VirtualMember!"",
|
||||
""nonVirtualMember"": ""NonVirtualMember!""
|
||||
}", result);
|
||||
@@ -6896,7 +6896,7 @@ Path '', line 1, position 1.");
|
||||
JValue v = (JValue)a[0];
|
||||
|
||||
Assert.AreEqual(typeof(string), v.Value.GetType());
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
""2000-01-02T03:04:05+06:00""
|
||||
]", a.ToString());
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
};
|
||||
string serializedString = JsonConvert.SerializeObject(inputContext, jsonSerializerSettings);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$type"": ""System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Guid, mscorlib]], mscorlib"",
|
||||
""k1"": ""5dd2dba0-20c0-49f8-a054-1fa3b0a8d774""
|
||||
}", serializedString);
|
||||
@@ -259,7 +259,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
|
||||
string json = JsonConvert.SerializeObject(child, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""_id"": 2,
|
||||
""Name"": ""Isabell"",
|
||||
""Father"": {
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
Assert.AreEqual(null, obj.Member5);
|
||||
|
||||
string json = JsonConvert.SerializeObject(obj, Formatting.Indented);
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""Member1"": 11,
|
||||
""Member2"": ""This value went into the data file during serialization."",
|
||||
""Member4"": null
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
// }
|
||||
// ]
|
||||
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
{
|
||||
""Name"": ""Joe Employee"",
|
||||
""Manager"": {
|
||||
@@ -331,7 +331,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
// }
|
||||
//]
|
||||
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
{
|
||||
""Name"": ""Joe Family Details"",
|
||||
""NumberOfChildren"": 4
|
||||
|
||||
@@ -1660,7 +1660,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
};
|
||||
string serializedString = JsonConvert.SerializeObject(inputContext, jsonSerializerSettings);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$type"": ""System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Guid, mscorlib]], mscorlib"",
|
||||
""k1"": ""a6e986df-fc2c-4906-a1ef-9492388f7833""
|
||||
}", serializedString);
|
||||
|
||||
Reference in New Issue
Block a user