예제 #1
0
        private void GenerateApiKey(IRandomDomainService randomDS)
        {
            const int apiKeyLength = 22;

            ApiKey = randomDS.GenerateRandomAlphanumericString(apiKeyLength);
        }
예제 #2
0
 public RandomDomain(IRandomDomainService randomDomainService)
 {
     _randomDomainService = randomDomainService;
 }
예제 #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);
        }