コード例 #1
0
        private void ConvertThroughProto(LedgerOffset source)
        {
            Com.DigitalAsset.Ledger.Api.V1.LedgerOffset protoValue = source.ToProto();
            LedgerOffset target = LedgerOffset.FromProto(protoValue);

            Assert.IsTrue(source == target);
        }
コード例 #2
0
        public void ProtoConversionOfLedgerBoundaryAbsolutesResolvesToledgerBoundaries()
        {
            var offsetBegin = LedgerOffset.FromProto(new LedgerOffset.Absolute(LedgerOffset.LedgerBegin.Instance.Offset).ToProto());

            Assert.AreEqual(typeof(LedgerOffset.LedgerBegin), offsetBegin.GetType());

            var offsetEnd = LedgerOffset.FromProto(new LedgerOffset.Absolute(LedgerOffset.LedgerEnd.Instance.Offset).ToProto());

            Assert.AreEqual(typeof(LedgerOffset.LedgerEnd), offsetEnd.GetType());
        }
コード例 #3
0
        public void ProtoConversionOfLedgerBoundaryAbsolutesResolvesToledgerBoundaries()
        {
            var offsetBegin = LedgerOffset.FromProto(new LedgerOffset.Absolute(LedgerOffset.LedgerBegin.Instance.Offset).ToProto());

            offsetBegin.Should().BeOfType <LedgerOffset.LedgerBegin>();

            var offsetEnd = LedgerOffset.FromProto(new LedgerOffset.Absolute(LedgerOffset.LedgerEnd.Instance.Offset).ToProto());

            offsetEnd.Should().BeOfType <LedgerOffset.LedgerEnd>();
        }