Exemplo n.º 1
0
        private void GenerateApiKey(IRandomDomainService randomDS)
        {
            const int apiKeyLength = 22;

            ApiKey = randomDS.GenerateRandomAlphanumericString(apiKeyLength);
        }
Exemplo n.º 2
0
 public RandomDomain(IRandomDomainService randomDomainService)
 {
     _randomDomainService = randomDomainService;
 }
Exemplo n.º 3
0
        public static Merchant RegisterNewMerchant(string name, CreditCardInformation creditCardInformation, IRandomDomainService randomDS)
        {
            var newMerchant = new Merchant
            {
                Name = name,
                CreditCardInformation = creditCardInformation
            };

            newMerchant.GenerateApiKey(randomDS);

            return(newMerchant);
        }