示例#1
0
        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());
        }
示例#2
0
        public List <dynamic> AddCountryDetails(CountryDetailsDTO countryDetailsDTO)
        {
            string insertProcedure = "[CRUD_CountryMaster]";

            Dictionary <string, string> input_parameters = new Dictionary <string, string>();

            input_parameters.Add("@pkey_country_id ", 1 + "#bigint#" + countryDetailsDTO.pkey_country_id);
            input_parameters.Add("@country_name", 1 + "#varchar#" + countryDetailsDTO.country_name);

            input_parameters.Add("@UserID ", 1 + " #bigint# " + countryDetailsDTO.UserID);
            input_parameters.Add("@is_delete ", 1 + "#int#" + countryDetailsDTO.is_delete);
            input_parameters.Add("@Type", 1 + "#int#" + countryDetailsDTO.Type);
            input_parameters.Add("@pkey_country_idOut", 2 + "#int#" + null);
            input_parameters.Add("@ReturnValue", 2 + "#int#" + null);

            return(obj.SqlCRUD(insertProcedure, input_parameters));
        }
示例#3
0
        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;
        }