public void OKTest() { DBTranslationProvider translationProvider = new DBTranslationProvider(); var translation = translationProvider.Translate(MultistringTags.TERMINAL_ADMIN_MENU_OK); Assert.AreEqual("OK", translation); }
public void CertificateErrorTest() { DBTranslationProvider translationProvider = new DBTranslationProvider(); var translation = translationProvider.Translate(MultistringTags.CERTIFICATE_ERROR); Assert.AreEqual("Certificate error.", translation); }
public void DisabledDefaultLangOKTest() { DBTranslationProvider translationProvider = new DBTranslationProvider(); ConfigurationManager.AppSettings["show_multistring_tags"] = "1"; var translation = translationProvider.Translate(MultistringTags.TERMINAL_ADMIN_MENU_OK); Assert.AreEqual("!TERMINAL_ADMIN_MENU_OK!", translation); ConfigurationManager.AppSettings["show_multistring_tags"] = null; }
public void stringFormatTest() { DBTranslationProvider translationProvider = new DBTranslationProvider(); var tgString = new TaggedStringLn(); tgString.Tag = "TERMINAL_CASHOUT"; tgString.Language = "EN"; tgString.Text = "TERMINAL_CASHOUT {0}"; LineSr.Instance.AllObjects.TaggedStrings.MergeLineObject(tgString); var translation = translationProvider.Translate(MultistringTags.TERMINAL_CASHOUT, 1); Assert.AreEqual("TERMINAL_CASHOUT 1", translation); }