Esempio n. 1
0
        public void WordWithoutTranslationIntegrationTest()
        {
            var m = new ForeignLanguageTranslator("pl", "en");
            var res = m.Translate("123-321-123-321-123");

            Assert.IsNotNull(res);
            Assert.AreEqual(0, res.Count);
        }
Esempio n. 2
0
        public void TranslateWordIntegrationTest()
        {
            var m = new ForeignLanguageTranslator("pl", "en");
            var res = m.Translate("computer science");

            Assert.IsNotNull(res);
            Assert.AreEqual(1, res.Count);

            var best = res.FirstOrDefault(x => x.Translation == "Informatyka");
            Assert.IsNotNull(best);
        }
Esempio n. 3
0
        public void IgnoreCaseTest()
        {
            var m = new ForeignLanguageTranslator("pl", "en");
            var res = m.Translate("cOmPUtEr sCiEnce");

            Assert.IsNotNull(res);
            Assert.AreEqual(1, res.Count);

            var best = res.FirstOrDefault(x => x.Translation == "Informatyka");
            Assert.IsNotNull(best);
        }