public static void TranslateWithExplicitCulture(TranslationSource.Row row)
            {
                Translator.Culture = null;
                var actual = Translator.Translate(Properties.Resources.ResourceManager, row.Key, row.Culture);

                Assert.AreEqual(row.ExpectedTranslation, actual);

                foreach (var errorHandling in Enum.GetValues(typeof(ErrorHandling))
                         .OfType <ErrorHandling>())
                {
                    actual = Translator.Translate(Properties.Resources.ResourceManager, row.Key, row.Culture, errorHandling);
                    Assert.AreEqual(row.ExpectedTranslation, actual);
                }

                foreach (var errorHandling in Enum.GetValues(typeof(ErrorHandling))
                         .OfType <ErrorHandling>())
                {
                    Translator.ErrorHandling = errorHandling;
                    actual = Translator.Translate(Properties.Resources.ResourceManager, row.Key, row.Culture);
                    Assert.AreEqual(row.ExpectedTranslation, actual);
                }
            }
        public void TranslateWithGlobalCulture(TranslationSource.Row row)
        {
            Translator.Culture = row.Culture;
            var actual = Translator <Properties.Resources> .Translate(row.Key);

            Assert.AreEqual(row.ExpectedTranslation, actual);

            foreach (var errorHandling in Enum.GetValues(typeof(ErrorHandling))
                     .OfType <ErrorHandling>())
            {
                actual = Translator <Properties.Resources> .Translate(row.Key, errorHandling);

                Assert.AreEqual(row.ExpectedTranslation, actual);
            }

            foreach (var errorHandling in Enum.GetValues(typeof(ErrorHandling))
                     .OfType <ErrorHandling>())
            {
                Translator.ErrorHandling = errorHandling;
                actual = Translator <Properties.Resources> .Translate(row.Key);

                Assert.AreEqual(row.ExpectedTranslation, actual);
            }
        }
            public static void TranslateWithGlobalCultureDoesNotSignalMissingTranslation(TranslationSource.Row row)
            {
                Translator.Culture = row.Culture;
                var missing = 0;

                Translator.MissingTranslation += (sender, args) => missing++;
                var actual = Translator.Translate(Properties.Resources.ResourceManager, row.Key);

                Assert.AreEqual(row.ExpectedTranslation, actual);
                Assert.AreEqual(0, missing);
            }