Exemple #1
0
 public WordCombinationFinder(
     int desiredLength,
     IWordsIndexFactory wordsIndexFactory,
     IAllPossibleCombinationsFinder allPossibleCombinationsFinder,
     IWordCombinationFilter wordCombinationFilter)
 {
     if (wordsIndexFactory == null)
     {
         throw new ArgumentNullException(nameof(wordsIndexFactory));
     }
     if (allPossibleCombinationsFinder == null)
     {
         throw new ArgumentNullException(nameof(allPossibleCombinationsFinder));
     }
     if (wordCombinationFilter == null)
     {
         throw new ArgumentNullException(nameof(wordCombinationFilter));
     }
     if (desiredLength < 1)
     {
         throw new ArgumentOutOfRangeException(nameof(desiredLength));
     }
     _desiredLength                 = desiredLength;
     _wordsIndexFactory             = wordsIndexFactory;
     _allPossibleCombinationsFinder = allPossibleCombinationsFinder;
     _wordCombinationFilter         = wordCombinationFilter;
 }
Exemple #2
0
 public virtual void SetUp()
 {
     _wordsIndexFactory             = A.Fake <IWordsIndexFactory>();
     _allPossibleCombinationsFinder = A.Fake <IAllPossibleCombinationsFinder>();
     _wordCombinationFilter         = A.Fake <IWordCombinationFilter>();
     _sut = new WordCombinationFinderFactory(_wordsIndexFactory, _allPossibleCombinationsFinder, _wordCombinationFilter);
 }
 public void SetUp()
 {
     _desiredLength                 = 6;
     _wordsIndexFactory             = new WordsIndexFactory();
     _allPossibleCombinationsFinder = new AllPossibleCombinationsFinder();
     _wordCombinationFilter         = new WordCombinationFilter();
     _sut = new WordCombinationFinder(_desiredLength, _wordsIndexFactory, _allPossibleCombinationsFinder, _wordCombinationFilter);
 }
Exemple #4
0
 public WordCombinationFinderFactory(
     IWordsIndexFactory wordsIndexFactory,
     IAllPossibleCombinationsFinder allPossibleCombinationsFinder,
     IWordCombinationFilter wordCombinationFilter)
 {
     if (wordsIndexFactory == null)
     {
         throw new ArgumentNullException(nameof(wordsIndexFactory));
     }
     if (allPossibleCombinationsFinder == null)
     {
         throw new ArgumentNullException(nameof(allPossibleCombinationsFinder));
     }
     if (wordCombinationFilter == null)
     {
         throw new ArgumentNullException(nameof(wordCombinationFilter));
     }
     _wordsIndexFactory             = wordsIndexFactory;
     _allPossibleCombinationsFinder = allPossibleCombinationsFinder;
     _wordCombinationFilter         = wordCombinationFilter;
 }