Esempio n. 1
0
        public void WordWithoutTranslationIntegrationTest()
        {
            var m = new MainLanguageTranslator("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 MainLanguageTranslator("pl", "en");
            var res = m.Translate("informatyka");

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

            var best = res.FirstOrDefault(x => x.Translation == "Computer science");
            Assert.IsNotNull(best);
        }
Esempio n. 3
0
        public void IgnoreCaseTest()
        {
            var m = new MainLanguageTranslator("pl", "en");
            var res = m.Translate("iNForMatYka");

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

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