public override int GetHashCode()
 {
     unchecked
     {
         return(((int)Number * 397) ^ (DepositId != null ? DepositId.GetHashCode() : 0));
     }
 }
Пример #2
0
        public async void MakeDepsoitCommandIsSentOnTheCommandBus_ThenTheCorrectHandlerShouldBeCalled()
        {
            var depositId = new DepositId();

            mockDepositHandler
            .Setup(mock => mock.Handle(It.IsAny <MakeDepositCommand>()))
            .ReturnsAsync(Result <EntityId> .Ok(depositId));

            var command = new MakeDepositCommand(new AccountId(), 1.23m, "A Purchase");

            var result = await commandBus.Handle(command);

            mockDepositHandler.Verify(mock => mock.Handle(command));

            result.Success.Should().Be(true);
            result.Value.Should().Be(depositId);
        }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (DepositId.Length != 0)
            {
                hash ^= DepositId.GetHashCode();
            }
            if (Data.Length != 0)
            {
                hash ^= Data.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Iterations != 0)
            {
                hash ^= Iterations.GetHashCode();
            }
            if (HeaderId.Length != 0)
            {
                hash ^= HeaderId.GetHashCode();
            }
            if (DepositId.Length != 0)
            {
                hash ^= DepositId.GetHashCode();
            }
            hash ^= args_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #5
0
 public override int GetHashCode()
 {
     return(DepositId != null ? DepositId.GetHashCode() : 0);
 }