Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public static void WriteUnixTimeSeconds_Double_InvalidInput_ShouldThrowArgumentException(double value)
        {
            var writer = new CborWriter();

            Assert.Throws <ArgumentException>(() => writer.WriteUnixTimeSeconds(value));
        }