Beispiel #1
0
        public NameGenerator(WordListContainer?firstNameWordListContainer, WordListContainer?lastNameWordContainer)
        {
            _firstNameWordListContainer
                = firstNameWordListContainer
                  ?? new FirstNameWordContainer();

            _lastNameContainer
                = lastNameWordContainer
                  ?? new LastNameWordContainer();
        }
Beispiel #2
0
        public void Setup(WordListContainer firstNameWordListContainer, WordListContainer lastNameWordContainer)
        {
            if (firstNameWordListContainer == null)
            {
                throw new ArgumentNullException(nameof(firstNameWordListContainer));
            }

            if (lastNameWordContainer == null)
            {
                throw new ArgumentNullException(nameof(lastNameWordContainer));
            }

            _firstNameWordListContainer = firstNameWordListContainer ?? new FirstNameWordContainer();
            _lastNameContainer          = lastNameWordContainer ?? new LastNameWordContainer();
        }
Beispiel #3
0
 public void Setup(WordListContainer wordListContainer)
 {
     _container = wordListContainer;
 }
Beispiel #4
0
 public WordGenerator()
 {
     _container = new LoremWordContainer();
 }