Skip to content

Commit

Permalink
Updated ObjectApproval to 2.*
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymonPobiega committed Mar 23, 2018
1 parent e0aed55 commit 84a1177
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/ScriptBuilder.Tests/ScriptBuilder.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
</ItemGroup>

<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
3 changes: 1 addition & 2 deletions src/ScriptBuilderTask.Tests/ScriptBuilderTask.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
</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
3 changes: 1 addition & 2 deletions src/SqlPersistence.Tests/SqlPersistence.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="NServiceBus.SqlServer" Version="4.0.0-beta0006" />
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
</ItemGroup>

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

Expand Down

0 comments on commit 84a1177

Please sign in to comment.