コード例 #1
0
ファイル: gbrainyTest.cs プロジェクト: nated099/gbrainy
        public void ShowTranslationMessageOnlyOnce()
        {
            GtkClient client = new GtkClient(translations);

            Preferences.ConfigPath = ".";
            Preferences.Clear();

            translations.Percentage = client.MIN_TRANSLATION - 1;
            Assert.AreEqual(true, client.ShouldShowTranslationWarning());
            Assert.AreEqual(false, client.ShouldShowTranslationWarning());
        }
コード例 #2
0
ファイル: gbrainyTest.cs プロジェクト: nated099/gbrainy
        public void ShowTranslationMessageWhenChangingVersion()
        {
            GtkClient client = new GtkClient(translations);

            Preferences.ConfigPath = ".";
            Preferences.Clear();

            translations.Percentage = client.MIN_TRANSLATION - 1;
            Assert.AreEqual(true, client.ShouldShowTranslationWarning());
            Preferences.Set <string> (Preferences.EnglishVersionKey, "n.n.n");
            Assert.AreEqual(true, client.ShouldShowTranslationWarning());
        }