Skip to content

Commit

Permalink
Made to build after the merge + updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Vytautas Kasparavičius committed Oct 16, 2018
1 parent 0085a3f commit d90118b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.cake
@@ -1,4 +1,4 @@
#addin "Cake.Json"
#addin nuget:?package=Newtonsoft.Json&version=9.0.1

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -12,7 +12,7 @@ var target = Argument("target", "Default");

IEnumerable<string> GetFrameworks(string path)
{
return new string[] { "netstandard1.4", "net451" };
return new string[] { "netstandard2.0", "net451" };
}

//////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions src/Hangfire.PostgreSql/Hangfire.PostgreSql.csproj
Expand Up @@ -29,6 +29,7 @@
<PackageReference Include="Hangfire.Core" Version="1.6.20" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
<PackageReference Include="Npgsql" Version="4.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
Expand Down
Expand Up @@ -31,7 +31,7 @@ public void Enumeration_IncludesTheDefaultProvider()

var result = collection.ToArray();

Assert.Equal(1, result.Length);
Assert.Single(result);
Assert.Same(_defaultProvider.Object, result[0]);
}

Expand Down
8 changes: 5 additions & 3 deletions tests/Hangfire.PostgreSql.Tests/PostgreSqlConnectionFacts.cs
Expand Up @@ -191,8 +191,8 @@ public void CreateExpiredJob_CreatesAJobInTheStorage_AndSetsItsParameters()
var sqlJob = sql.Query(@"select * from """ + GetSchemaName() + @""".""job""").Single();
Assert.Equal(jobId, sqlJob.id.ToString());
Assert.Equal(createdAt, sqlJob.createdat);
Assert.Equal(null, (int?) sqlJob.stateid);
Assert.Equal(null, (string) sqlJob.statename);
Assert.Null((int?) sqlJob.stateid);
Assert.Null((string) sqlJob.statename);
var invocationData = JobHelper.FromJson<InvocationData>((string) sqlJob.invocationdata);
invocationData.Arguments = sqlJob.arguments;
Expand Down Expand Up @@ -712,7 +712,7 @@ public void GetAllItemsFromSet_ReturnsEmptyCollection_WhenKeyDoesNotExist()
var result = connection.GetAllItemsFromSet("some-set");
Assert.NotNull(result);
Assert.Equal(0, result.Count);
Assert.Empty(result);
});
}

Expand Down Expand Up @@ -1349,7 +1349,9 @@ private static string GetSchemaName()
return ConnectionUtils.GetSchemaName();
}

#pragma warning disable xUnit1013 // Public method should be marked as test
public static void SampleMethod(string arg)
#pragma warning restore xUnit1013 // Public method should be marked as test
{
}
}
Expand Down
Expand Up @@ -63,7 +63,7 @@ public void Ctor_AcquiresExclusiveApplicationLock_WithUseNativeDatabaseTransacti
@"select count(*) from """ + GetSchemaName() + @""".""lock"" where ""resource"" = @resource",
new { resource = "hello" }).Single();
Assert.Equal(lockCount, 1);
Assert.Equal(1, lockCount);
//Assert.Equal("Exclusive", lockMode);
});
}
Expand Down Expand Up @@ -111,7 +111,7 @@ public void Ctor_AcquiresExclusiveApplicationLock_WithoutUseNativeDatabaseTransa
@"select count(*) from """ + GetSchemaName() + @""".""lock"" where ""resource"" = @resource",
new { resource = "hello" }).Single();
Assert.Equal(lockCount, 1);
Assert.Equal(1, lockCount);
//Assert.Equal("Exclusive", lockMode);
});
}
Expand Down Expand Up @@ -202,7 +202,7 @@ public void Dispose_ReleasesExclusiveApplicationLock_WithUseNativeDatabaseTransa
@"select count(*) from """ + GetSchemaName() + @""".""lock"" where ""resource"" = @resource",
new { resource = "hello" }).Single();
Assert.Equal(lockCount, 0);
Assert.Equal(0, lockCount);
});
}

Expand All @@ -224,7 +224,7 @@ public void Dispose_ReleasesExclusiveApplicationLock_WithoutUseNativeDatabaseTra
@"select count(*) from """ + GetSchemaName() + @""".""lock"" where ""resource"" = @resource",
new { resource = "hello" }).Single();
Assert.Equal(lockCount, 0);
Assert.Equal(0, lockCount);
});
}

Expand Down
2 changes: 2 additions & 0 deletions tests/Hangfire.PostgreSql.Tests/PostgreSqlJobQueueFacts.cs
Expand Up @@ -448,7 +448,9 @@ private static CancellationToken CreateTimingOutCancellationToken()
return source.Token;
}

#pragma warning disable xUnit1013 // Public method should be marked as test
public static void Sample(string arg1, string arg2)
#pragma warning restore xUnit1013 // Public method should be marked as test
{
}

Expand Down
Expand Up @@ -91,8 +91,10 @@ private void UseConnection(Action<NpgsqlConnection> action)
}
}

public static void SampleMethod(string arg)
{
#pragma warning disable xUnit1013 // Public method should be marked as test
public static void SampleMethod(string arg)
#pragma warning restore xUnit1013 // Public method should be marked as test
{
}
}
}

0 comments on commit d90118b

Please sign in to comment.