Ejemplo n.º 1
0
        public void GetLanguage_ReturnsLanguage_String()
        {
            //Arrange
            string inputCountryCode = "TST";
            string inputLanguage    = "test-Language";
            bool   inputIsOfficial  = true;
            float  inputPercentage  = 4.0f;

            CountryLanguage testCountryLanguage = new CountryLanguage(inputCountryCode, inputLanguage, inputIsOfficial, inputPercentage);

            //Act
            string resultLanguage = testCountryLanguage.GetLanguage();

            //Assert
            Assert.AreEqual("test-Language", resultLanguage);
        }
Ejemplo n.º 2
0
        public void SetLanguage_UpdatesLanguage_Void()
        {
            //Arrange
            string inputCountryCode = "TST";
            string inputLanguage    = "test-Language";
            bool   inputIsOfficial  = true;
            float  inputPercentage  = 4.0f;

            CountryLanguage testCountryLanguage = new CountryLanguage(inputCountryCode, inputLanguage, inputIsOfficial, inputPercentage);


            //Act
            string inputLanguageUpdate = "test-Language01";

            testCountryLanguage.SetLanguage(inputLanguageUpdate);
            string resultLanguage = testCountryLanguage.GetLanguage();

            //Assert
            Assert.AreEqual("test-Language01", resultLanguage);
        }