Example #1
0
        public void Handle()
        {
            var inputWords = _inputWordRepository.GetInputWords();
            var results    = _wordCombineAlgorithm.FindCombinations(inputWords);

            _resultPrinter.Print(results);
        }
Example #2
0
        public void GivenOnly1ValidCombinationOf2Words_ItShouldReturnTheCombination()
        {
            // arrange
            var inputWords = new[] { "foo", "bar", "foobar" };

            // act
            var result = _sut.FindCombinations(inputWords);

            // assert
            Assert.AreEqual(1, result.Count());
            Assert.AreEqual("foobar", result.Single().Combined);
        }