public static void ClassInitialize(TestContext testContext) { var configurationMockSetup = new Mock <IConfiguration>(); configurationMockSetup.Setup(x => x["DictionaryFileLocation"]).Returns("anywhere"); _configurationMock = configurationMockSetup.Object; TreeNode tNode = new TreeNode(TestWord); tNode.AddWord("today"); tNode.AddWord("termics"); tNode.AddWord("tomorrow"); tNode.AddWord("tastings"); TreeNode gNode = new TreeNode("game"); gNode.AddWord("go"); gNode.AddWord("get"); TreeNode wNode = new TreeNode("we"); _dictionary = new Dictionary <char, TreeNode> { { 't', tNode }, { 'g', gNode }, { 'w', wNode } }; var providerMockSetup = new Mock <IWordsProvider>(); providerMockSetup.Setup(x => x.CreateNodesFromDictionaryFile(It.IsAny <string>())).Returns(_dictionary); _providerMock = providerMockSetup.Object; }
public CircularCloudLayouter( ICurve curve, IWordsProvider wordsProvider, IWordsFilter wordsFilter) { this.curve = curve; WordsProvider = wordsProvider; WordsFilter = wordsFilter; }
/// <summary> /// Initializes a new instance of the <see cref="HelpDeskIdGenerator"/> class. /// </summary> /// <param name="numberOfWords">The number of words to pick. Defaults to 3.</param> /// <param name="separator">The word separator to use. Defaults to "-".</param> /// <param name="wordsProvider">The <see cref="IWordsProvider"/> to source the words. Defaults to <see cref="ResourcesWordsProvider"/>.</param> public HelpDeskIdGenerator( int numberOfWords = 3, string separator = "-", IWordsProvider wordsProvider = null) { _numberOfWords = numberOfWords; _separator = separator ?? throw new ArgumentNullException(nameof(separator)); _wordsProvider = wordsProvider ?? new ResourcesWordsProvider(); }
private static CloudBuilder PrepareCloudBuilder( IWordsProvider wordsProvider, IStyleProvider styleProvider, ICloudLayouter layouter, ICloudSettingsProvider settingsProvider) { return(CloudBuilder.StartNew(layouter, settingsProvider) .WithWordsSize(word => TextRenderer.MeasureText(word, styleProvider.GetStyle(word).Font)) .WithWords(wordsProvider.GetWords())); }
public CloudRenderer( IWordsProvider wordsProvider, IStyleProvider styleProvider, ICloudLayouter cloudLayouter, ICloudSettingsProvider settingsProvider) { this.styleProvider = styleProvider; this.settingsProvider = settingsProvider; cloudBuilder = PrepareCloudBuilder(wordsProvider, styleProvider, cloudLayouter, settingsProvider); }
public MainMenu(IWordsProvider wordsProvider, UserOutput userOutput, IUserInputParser userInputParser, IGameInterfaceManager gameInterfaceManager, IGameMediator gameMediator) { _wordsProvider = wordsProvider; _userOutput = userOutput; _userInputParser = userInputParser; _gameInterfaceManager = gameInterfaceManager; _gameMediator = gameMediator; }
public TagCreator(IWordsProvider wordsProvider, IFrequencyProvider frequencyProvider, ISizableProvider sizableProvider, IDrawableProvider drawableProvider, IDrawer drawer) { this.wordsProvider = wordsProvider; this.frequencyProvider = frequencyProvider; this.sizableProvider = sizableProvider; this.drawableProvider = drawableProvider; this.drawer = drawer; }
public StyleProvider(IWordsProvider wordsProvider, IStyleSettingsProvider settingsProvider) { this.wordsProvider = wordsProvider; this.settingsProvider = settingsProvider; }
public CloudTagProvider(CloudTagProperties properties, IWordsProvider provider) { this.properties = properties; this.provider = provider; }
public HangmanGame(IWordsProvider wordsProvider, IVisualizationProvider visualizationProvider) { _wordsProvider = wordsProvider; _visualizationProvider = visualizationProvider; }
public CompetencesSearchWordsProvider(CachedItemProvider<IList<string>> cachedWords, IWordsProvider wordsProvider) { _cachedItemProvider = cachedWords; _wordsProvider = wordsProvider; }
public WordTreeManager(IWordsProvider wordsProvider, IConfiguration configuration) { _parentNodes = wordsProvider.CreateNodesFromDictionaryFile(configuration["DictionaryFileLocation"]); }