public void CanTranslateUsingEnum()
        {
            var translations = new List<Translation>
                {
                    new Translation("WelcomeMessage", "Hello this is a test", new CultureInfo("en-US")),
                    new Translation("WelcomeMessage", "Hallo dit is een test", new CultureInfo("nl-NL"))
                };

            var translationService = new TranslationService(translations, new CultureInfo("en-US"));

            Assert.AreEqual("Hello this is a test", translationService.Translate(Test.WelcomeMessage));
            Assert.AreEqual("Hallo dit is een test", translationService.Translate(Test.WelcomeMessage, new CultureInfo("nl-NL")));
        }
        public void CanTranslateUsingMethodCallInsteadOfProperty()
        {
            var translations = new List<Translation>
                {
                    new Translation("WelcomeMessage", "Hello this is a test", new CultureInfo("en-US"))
                };

            var translationService = new TranslationService(translations, new CultureInfo("en-US"));

            Assert.AreEqual("Hello this is a test", translationService.Translate("WelcomeMessage"));
        }
        public void IfTranslationForSpecificCultureDoesNotExistDefaultCutureIsUsed()
        {
            var translations = new List<Translation>
                {
                    new Translation("WelcomeMessage", "Hello this is a test", new CultureInfo("en-US"))
                };

            var translationService = new TranslationService(translations, new CultureInfo("en-US"));

            Assert.AreEqual("Hello this is a test", translationService.Translate("WelcomeMessage", new CultureInfo("nl-NL")));
        }
        public void WhenDefaultCultureIsNullServiceWillNotBreak()
        {
            var translations = new List<Translation>
                {
                    new Translation("WelcomeMessage", "Hallo dit is een test", new CultureInfo("nl-NL"))
                };

            var translationService = new TranslationService(translations, null);

            Assert.AreEqual("WelcomeMessage", translationService.Translate.WelcomeMessage);
            Assert.AreEqual("Hallo dit is een test", translationService.Translate("WelcomeMessage", new CultureInfo("nl-NL")));
        }