コード例 #1
0
        public void TestMarshallBody()
        {
            var body = CreateDummyEventBody();

            var raw = body.Marshal();

            var newBody = EventBody.Unmarshal(raw);

            newBody.ShouldCompareTo(body);
        }
コード例 #2
0
ファイル: EventTests.cs プロジェクト: erinloy/babble-cs
        public void TestMarshallBody()
        {
            var body = CreateDummyEventBody();

            var raw = body.Marshal();

            var newBody = EventBody.Unmarshal(raw);

            newBody.ShouldCompareTo(body);

            newBody.Transactions.ShouldCompareTo(body.Transactions);

            newBody.BlockSignatures.ShouldCompareTo(body.BlockSignatures);

            newBody.Parents.ShouldCompareTo(body.Parents);

            newBody.Creator.ShouldCompareTo(body.Creator);

            Assert.Equal(body.Timestamp, newBody.Timestamp);
        }