Example #1
0
        public MostUsedWordsBenchmark()
        {
            var tranlatorService = new OfflineTranslatorService(new GoogleTranslatorServiceFake());

            for (int i = 0; i < 100; i++)
            {
                text += "My text to test. It will repeat the text word";
            }
            sut           = new MostUsedWordsService(tranlatorService);
            comparisonSut = new MostUsedWordsServicePoC(tranlatorService);

            // convert string to stream
            var byteArray = Encoding.UTF8.GetBytes(text);

            stream = new MemoryStream(byteArray);

            // convert stream to string
            textReader = new StreamReader(stream);
        }
        public MostUsedWordsTests()
        {
            var tranlatorService = new OfflineTranslatorService(new Mock <GoogleTranslatorService>().Object);

            sut = new MostUsedWordsService(tranlatorService);
        }