示例#1
0
        public void Map_AuthorizeResponseDto_CorrectCheckOutId()
        {
            var src = new AuthorizeResponseDto {
                CheckoutId = Factory.GetString()
            };

            var dest = _mapper.Map <AuthorizeResponse>(src);

            Assert.Equal(src.CheckoutId, dest.CheckoutId);
        }
示例#2
0
 private void AssertAuthorize(AuthorizeCommand command, AuthorizeResponseDto result)
 {
     Assert.AreEqual(command.Email, result.Email);
     Assert.That(DateTimeService.NowUtc < result.ExpirationRefreshTokenUtc);
     Assert.That(DateTimeService.NowUtc < result.ExpirationTokenUtc);
     Assert.That(result.RefreshToken, IsNotNullOrEmpty);
     Assert.That(result.Token, IsNotNullOrEmpty);
     Assert.That(result.Roles, IsNotNullOrEmpty);
     Assert.AreEqual(DefaultUserId, result.UserId);
     Assert.That(result.Username, IsNotNullOrEmpty);
 }
示例#3
0
        public void Map_AuthorizeResponseDto_CorrectCustomerNumber()
        {
            var src = new AuthorizeResponseDto {
                Customer = new CustomerResponseDto {
                    CustomerNumber = Factory.GetString()
                }
            };

            var dest = _mapper.Map <AuthorizeResponse>(src);

            Assert.Equal(src.Customer.CustomerNumber, dest.CustomerNumber);
        }