Exemplo n.º 1
0
        public void GivenTrxrBlock_WhenInitialized_ShouldValidates()
        {
            var subject = new TrxBlock("referenceId", "credit", 100);

            subject.Digest.Should().NotBeNullOrEmpty();

            subject.Digest.Should().Be(subject.GetDigest());
        }
Exemplo n.º 2
0
        public void GivenTrxBlock_WhenCloned_ShouldValidate()
        {
            var subject = new TrxBlock("referenceId", "credit", 100);

            subject.Digest.Should().NotBeNullOrEmpty();
            subject.Digest.Should().Be(subject.GetDigest());

            var s1 = new TrxBlock(subject.ReferenceId, subject.TransactionType, subject.Value);

            subject.Digest.Should().Be(s1.GetDigest());
            (subject == s1).Should().BeTrue();
        }