Beispiel #1
0
 public void Equals_WithEqual_ShouldBeEqual()
 {
     EqualityTesting.TestEquals(
         this.subject,
         s => new ConfirmedBalanceChange <object, int>(null, s.Amount, s.Confirmation)
         );
 }
Beispiel #2
0
 public void Equals_WithEqual_ShouldBeEqual()
 {
     EqualityTesting.TestEquals(
         this.subject,
         s => new BalanceChange <object, int>(null, s.Amount),
         s => new BalanceChange <object, int>(new object(), s.Amount)
         );
 }
Beispiel #3
0
        public void Equals_WithEqual_ShouldReturnTrue()
        {
            var results = EqualityTesting.TestEquals(this.subject, s => new CallbackData()
            {
                Received = s.Received
            });

            Assert.DoesNotContain(false, results);
        }
Beispiel #4
0
        public void Equals_WithEqual_ShouldReturnTrue()
        {
            var results = EqualityTesting.TestEquals(
                this.subject,
                s => new BalanceChange <object, int>(null, s.Amount),
                s => new BalanceChange <object, int>(new object(), s.Amount));

            results.Should().NotContain(false);
        }
Beispiel #5
0
        public void Equals_WithEqual_ShouldReturnTrue()
        {
            var results = EqualityTesting.TestEquals(
                this.subject,
                s => new CallbackAmount()
            {
                Confirmed = s.Confirmed, Pending = s.Pending
            });

            Assert.DoesNotContain(false, results);
        }
Beispiel #6
0
        public void Equals_WithEqual_ShouldReturnTrue()
        {
            var results = EqualityTesting.TestEquals(
                this.subject,
                s => new BalanceWatch <object, int>(
                    null,
                    s.StartBlock,
                    s.Transaction,
                    s.Address,
                    s.BalanceChange,
                    s.StartTime,
                    s.Id),
                s => new BalanceWatch <object, int>(
                    s.Context,
                    s.StartBlock,
                    s.Transaction,
                    s.Address,
                    9,
                    s.StartTime,
                    s.Id),
                s => new BalanceWatch <object, int>(
                    s.Context,
                    s.StartBlock,
                    s.Transaction,
                    s.Address,
                    s.BalanceChange,
                    DateTime.MinValue,
                    s.Id),
                s => new BalanceWatch <object, int>(
                    s.Context,
                    s.StartBlock,
                    s.Transaction,
                    s.Address,
                    s.BalanceChange,
                    s.StartTime,
                    Guid.NewGuid()));

            results.Should().NotContain(false);
        }
Beispiel #7
0
        public void Equals_WithEqual_ShouldReturnTrue()
        {
            var results = EqualityTesting.TestEquals(
                this.subject,
                s => new Rule(
                    new PropertyId(4),
                    s.AddressReservation,
                    s.TargetAmount,
                    s.TargetConfirmation,
                    s.OriginalTimeout,
                    s.Callback,
                    s.Id),
                s => new Rule(
                    s.Property,
                    new ReceivingAddressReservation(Guid.NewGuid(), this.address, DateTime.Now, null),
                    s.TargetAmount,
                    s.TargetConfirmation,
                    s.OriginalTimeout,
                    s.Callback,
                    s.Id),
                s => new Rule(
                    s.Property,
                    s.AddressReservation,
                    new PropertyAmount(50),
                    s.TargetConfirmation,
                    s.OriginalTimeout,
                    s.Callback,
                    s.Id),
                s => new Rule(
                    s.Property,
                    s.AddressReservation,
                    s.TargetAmount,
                    1,
                    s.OriginalTimeout,
                    s.Callback,
                    s.Id),
                s => new Rule(
                    s.Property,
                    s.AddressReservation,
                    s.TargetAmount,
                    s.TargetConfirmation,
                    TimeSpan.FromMinutes(30),
                    s.Callback,
                    s.Id),
                s => new Rule(
                    s.Property,
                    s.AddressReservation,
                    s.TargetAmount,
                    s.TargetConfirmation,
                    s.OriginalTimeout,
                    s.Callback,
                    s.Id),
                s => new Rule(
                    s.Property,
                    s.AddressReservation,
                    s.TargetAmount,
                    s.TargetConfirmation,
                    s.OriginalTimeout,
                    null,
                    s.Id));

            Assert.DoesNotContain(false, results);
        }
        public void Equals_WithEqual_ShouldReturnTrue()
        {
            var results = EqualityTesting.TestEquals(this.subject, this.equals);

            Assert.DoesNotContain(false, results);
        }