public void CountryDetailsDTO_GetName_NotNullOrEmpty() { CountryDetailsDTO country = new CountryDetailsDTO() { Name_NB = "Norge", Name_NN = "Noreg", Name_EN = "Norway", Code = "no" }; Assert.NotNull(country.GetName()); Assert.NotEmpty(country.GetName()); }
public void CountryDetailsDTO_GetName_ReturnsCorrect(string code, string nb, string nn, string en, string result) { CultureInfo initialCulture = CultureInfo.CurrentCulture; CultureInfo.CurrentCulture = new CultureInfo(code); CountryDetailsDTO country = new CountryDetailsDTO() { Name_NB = nb, Name_NN = nn, Name_EN = en, Code = code }; Assert.Equal(result, country.GetName()); CultureInfo.CurrentCulture = initialCulture; }