Skip to content

Commit

Permalink
Merge pull request #269 from Particular/support-json-11
Browse files Browse the repository at this point in the history
Use Newtonsoft.Json 11 in V4
  • Loading branch information
SzymonPobiega authored Mar 26, 2018
2 parents dffc61b + 84a1177 commit a856d0b
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ assembly-versioning-scheme: Major
next-version: 4.0
branches:
develop:
tag: alpha
tag: beta
release:
tag: rc
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ TypeReference GetTypeReference(object value)
public TypeReference AttributeType => throw new NotImplementedException();
public bool HasFields => throw new NotImplementedException();
public bool HasProperties => true;
public bool HasConstructorArguments => false;
public Collection<CustomAttributeNamedArgument> Fields => throw new NotImplementedException();

public Collection<CustomAttributeNamedArgument> Properties
{
get;
}

public Collection<CustomAttributeArgument> ConstructorArguments { get; } = new Collection<CustomAttributeArgument>();
}
2 changes: 1 addition & 1 deletion src/ScriptBuilder.Tests/ScriptBuilder.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom" Version="14.*" />
<PackageReference Include="ObjectApproval" Version="1.*" />
<PackageReference Include="ObjectApproval" Version="2.*" />
<PackageReference Include="PublicApiGenerator" Version="6.*" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/ScriptBuilder.Tests/SetUpFixture.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using NUnit.Framework;

[SetUpFixture]
Expand All @@ -9,6 +10,9 @@ public class SetUpFixture
[OneTimeSetUp]
public void SetUp()
{
#if NET452
ObjectApproval.ObjectApprover.JsonSerializer.DefaultValueHandling = DefaultValueHandling.Include;
#endif
FixCurrentDirectory();
}

Expand Down
2 changes: 1 addition & 1 deletion src/ScriptBuilderTask.Tests/ScriptBuilderTask.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="ObjectApproval" Version="1.*" />
<PackageReference Include="ObjectApproval" Version="2.*" />
</ItemGroup>

</Project>
23 changes: 23 additions & 0 deletions src/ScriptBuilderTask.Tests/SetUpFixture.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using NUnit.Framework;

[SetUpFixture]
public class SetUpFixture
{
[OneTimeSetUp]
public void SetUp()
{
#if NET452
ObjectApproval.ObjectApprover.JsonSerializer.DefaultValueHandling = DefaultValueHandling.Include;
#endif
FixCurrentDirectory();
}

void FixCurrentDirectory([CallerFilePath] string callerFilePath="")
{
Environment.CurrentDirectory = Directory.GetParent(callerFilePath).FullName;
}
}
4 changes: 4 additions & 0 deletions src/SqlPersistence.Tests/SetUpFixture.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using NUnit.Framework;

[SetUpFixture]
Expand All @@ -9,6 +10,9 @@ public class SetUpFixture
[OneTimeSetUp]
public void SetUp()
{
#if NET452
ObjectApproval.ObjectApprover.JsonSerializer.DefaultValueHandling = DefaultValueHandling.Include;
#endif
FixCurrentDirectory();
using (var connection = MsSqlConnectionBuilder.Build())
{
Expand Down
2 changes: 1 addition & 1 deletion src/SqlPersistence.Tests/SqlPersistence.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="ObjectApproval" Version="1.*" />
<PackageReference Include="ObjectApproval" Version="2.*" />
<PackageReference Include="PublicApiGenerator" Version="6.*" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/SqlPersistence/SqlPersistence.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="[10.0.1, 11.0.0)" />
<PackageReference Include="Newtonsoft.Json" Version="[11.0.1, 12.0.0)" />
<PackageReference Include="NServiceBus" Version="[7.0.0-rc0001, 8.0.0)" />
<PackageReference Include="Fody" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="Obsolete.Fody" Version="4.3.2" PrivateAssets="All" />
Expand Down

0 comments on commit a856d0b

Please sign in to comment.