Example #1
0
        public void LanguagesManager_GetLanguageId_SendEnLanguageName_ExpectSpecificLanguageId()
        {
            //arrange
            const string languageName = "en";
            const int expectedValue = 3;
            var languagesManager = new LanguagesManager(_mockLanguageRepository);

            //act
            int result = languagesManager.GetLanguageId(languageName);

            //assert
            Assert.AreEqual(expectedValue, result);
        }
Example #2
0
        public void LanguagesManager_GetLanguageId_SendNullAndEmptyAndNotValidName_ExpectDefaultLanguageId(
            string languageName)
        {
            //arrange
            const int expectedValue = 1;
            var languagesManager = new LanguagesManager(_mockLanguageRepository);

            //act
            int result = languagesManager.GetLanguageId(languageName);

            //assert
            Assert.AreEqual(expectedValue, result);
        }