public void HexBigInteger_To_Long_Given_Value_Exceeding_Max_Returns_MaxLong()
        {
            var massiveNumber = new HexBigInteger("121526483101021574530");

            Assert.Equal(long.MaxValue, massiveNumber.ToLong());
        }
Exemplo n.º 2
0
 public BlockInfo(HexBigInteger blockNumber, DateTime timestamp)
 {
     BlockNumber = blockNumber.ToLong();
     Timestamp   = timestamp;
 }
        public void HexBigInteger_To_Long_Given_A_Value_Returns_Long()
        {
            var hexBigInt = new HexBigInteger(10);

            Assert.Equal(10, hexBigInt.ToLong());
        }
Exemplo n.º 4
0
 public BlockInfo(HexBigInteger blockNumber, HexBigInteger timestamp)
 {
     BlockNumber = blockNumber.ToLong();
     Timestamp   = new DateTime(timestamp.ToLong() * 1000 * 10000 + new DateTime(1970, 1, 1).Ticks);
 }