示例#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);
        }
示例#2
0
        public static void WriteUnixTimeSeconds_Double_InvalidInput_ShouldThrowArgumentException(double value)
        {
            var writer = new CborWriter();

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