Sfoglia il codice sorgente

Fixes unit test.

master
Savorboard 3 anni fa
parent
commit
c3faabce06
2 ha cambiato i file con 0 aggiunte e 22 eliminazioni
  1. +0
    -9
      src/DotNetCore.CAP/Internal/Helper.cs
  2. +0
    -13
      test/DotNetCore.CAP.Test/HelperTest.cs

+ 0
- 9
src/DotNetCore.CAP/Internal/Helper.cs Vedi File

@@ -10,15 +10,6 @@ namespace DotNetCore.CAP.Internal
{
public static class Helper
{
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local)
.AddHours(TimeZoneInfo.Local.BaseUtcOffset.Hours);

public static long ToTimestamp(DateTime value)
{
var elapsedTime = value - Epoch;
return (long)elapsedTime.TotalSeconds;
}

public static bool IsController(TypeInfo typeInfo)
{
if (!typeInfo.IsClass)


+ 0
- 13
test/DotNetCore.CAP.Test/HelperTest.cs Vedi File

@@ -7,19 +7,6 @@ namespace DotNetCore.CAP.Test
{
public class HelperTest
{
[Fact]
public void ToTimestampTest()
{
//Arrange
var time = DateTimeOffset.Parse("2018-01-01T00:00:00Z");

//Act
var result = Helper.ToTimestamp(time.DateTime);

//Assert
Assert.Equal(1514736000, result);
}

[Fact]
public void IsControllerTest()
{


Caricamento…
Annulla
Salva