Retrieves words from dictionaries stored in files. First looks for external file that user might have created. If this does not exist then data is retrieved from embedded resource files.
Inheritance: IDictionaryRepository
        public void GivenAResourceDictionaryAndNoExternalFileDictionary_WhenRetrievingWords_ThenResourceDictionaryIsUsed()
        {
            var sut = new CachedFileDictionaryRepository();

            var result = sut.GetWordsFrom("GeoContinent");

            result.Count.ShouldBe(7);
            result[0].ShouldBe("Asia");
        }
        public void GivenAnExternalFileDictionaryExists_WhenRetrievingWords_ThenExternalDictionaryIsUsed()
        {
            var sut = new CachedFileDictionaryRepository();

            var result = sut.GetWordsFrom("SampleDictionaryFile");

            result.Count.ShouldBe(2);
            result[0].ShouldBe("File first word");
        }
 public void GivenNoResourceDictionaryAndNoExternalFileDictionary_WhenRetrievingWords_ThenFileNotFoundException()
 {
     var sut = new CachedFileDictionaryRepository();
     Should.Throw<FileNotFoundException>(() => sut.GetWordsFrom("NonExistentDictionary"));
 }