public static void WriteUnixTimeSeconds_Double_SingleValue_HappyPath(double value, string expectedHexEncoding) { using var writer = new CborWriter(); writer.WriteUnixTimeSeconds(value); byte[] encoding = writer.GetEncoding(); AssertHelper.HexEqual(expectedHexEncoding.HexToByteArray(), encoding); }
public static void WriteUnixTimeSeconds_Double_InvalidInput_ShouldThrowArgumentException(double value) { var writer = new CborWriter(); Assert.Throws <ArgumentException>(() => writer.WriteUnixTimeSeconds(value)); }