public void Update_country_name_in_dictionary_count_is_3()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 1, "les États-Unis");

        Assert.Equal(3, countryCodes.Count);
    }
    public void Remove_country_from_dictionary_for_non_existent_country_91_is_India()
    {
        var countryCodes = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 999);

        Assert.Equal("India", countryCodes[91]);
    }
    public void Longest_country_name_for_empty_dictionary()
    {
        var longestCountryName = DialingCodes.FindLongestCountryName(
            DialingCodes.GetEmptyDictionary());

        Assert.Equal(string.Empty, longestCountryName);
    }
    public void Remove_country_from_dictionary_for_non_existent_country_1_is_United_States_of_America()
    {
        var countryCodes = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 999);

        Assert.Equal("United States of America", countryCodes[1]);
    }
    public void Remove_country_from_dictionary_for_non_existent_country_55_is_Brazil()
    {
        var countryCodes = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 999);

        Assert.Equal("Brazil", countryCodes[55]);
    }
    public void Add_country_to_existing_dictionary_55_is_Brazil()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal("Brazil", countryCodes[55]);
    }
Пример #7
0
    public void Longest_country_name()
    {
        var idcd = DialingCodes.FindLongestCountryName(
            DialingCodes.GetExistingDictionary());

        Assert.Equal("United States of America", idcd);
    }
    public void Update_country_name_in_dictionary_for_non_existent_country_55_is_Brazil()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 999, "Newlands");

        Assert.Equal("Brazil", countryCodes[55]);
    }
    public void Update_country_name_in_dictionary_for_non_existent_country_91_is_India()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 999, "Newlands");

        Assert.Equal("India", countryCodes[91]);
    }
    public void Update_country_name_in_dictionary_for_non_existent_country_count_is_3()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 999, "Newlands");

        Assert.Equal(3, countryCodes.Count);
    }
    public void Update_country_name_in_dictionary_for_non_existent_country_1_is_United_States_of_America()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 999, "Newlands");

        Assert.Equal("United States of America", countryCodes[1]);
    }
    public void Update_country_name_in_dictionary_91_is_India()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 1, "les États-Unis");

        Assert.Equal("India", countryCodes[91]);
    }
    public void Update_country_name_in_dictionary_55_is_Brazil()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 1, "les États-Unis");

        Assert.Equal("Brazil", countryCodes[55]);
    }
    public void Update_country_name_in_dictionary_1_is_les_Etats_Unis()
    {
        var countryCodes = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 1, "les États-Unis");

        Assert.Equal("les États-Unis", countryCodes[1]);
    }
    public void Add_country_to_existing_dictionary_1_is_United_States_of_America()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal("United States of America", countryCodes[1]);
    }
    public void Remove_country_from_dictionary_count_is_2()
    {
        var countryCodes = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 91);

        Assert.Equal(2, countryCodes.Count);
    }
    public void Add_country_to_existing_dictionary_44_is_United_Kingdom()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal("United Kingdom", countryCodes[44]);
    }
    public void Remove_country_from_dictionary_for_non_existent_country_count_is_3()
    {
        var countryCodes = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 999);

        Assert.Equal(3, countryCodes.Count);
    }
    public void Add_country_to_existing_dictionary_91_is_India()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal("India", countryCodes[91]);
    }
    public void Add_country_to_existing_dictionary_count_is_1()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal(4, countryCodes.Count);
    }
    public void Check_country_exists_for_non_existent_country()
    {
        var exists = DialingCodes.CheckCodeExists(
            DialingCodes.GetExistingDictionary(), 999);

        Assert.False(exists);
    }
Пример #22
0
    public void Try_to_get_non_existent_country_name_from_dictionary()
    {
        var countryName = DialingCodes.GetCountryNameFromDictionary(
            DialingCodes.GetExistingDictionary(), 999);

        Assert.Equal(string.Empty, countryName);
    }
Пример #23
0
    public void Check_country_exists()
    {
        var exists = DialingCodes.CheckCodeExists(
            DialingCodes.GetExistingDictionary(), 55);

        Assert.True(exists);
    }
Пример #24
0
    public void Get_country_name_from_dictionary()
    {
        var countryName = DialingCodes.GetCountryNameFromDictionary(
            DialingCodes.GetExistingDictionary(), 55);

        Assert.Equal("Brazil", countryName);
    }
Пример #25
0
    public void Add_country_to_empty_dictionary()
    {
        var idcd = DialingCodes.AddCountryToEmptyDictionary(44, "United Kingdom");

        Assert.Equal(1, idcd.Count);
        Assert.Equal("United Kingdom", idcd[44]);
    }
Пример #26
0
    public void Remove_country_from_dictionary()
    {
        var idcd = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 91);

        Assert.Equal(2, idcd.Count);
        Assert.Equal("United States of America", idcd[1]);
        Assert.Equal("Brazil", idcd[55]);
    }
Пример #27
0
    public void Existing_dictionary()
    {
        var idcd = DialingCodes.GetExistingDictionary();

        Assert.Equal(3, idcd.Count);
        Assert.Equal("United States of America", idcd[1]);
        Assert.Equal("Brazil", idcd[55]);
        Assert.Equal("India", idcd[91]);
    }
Пример #28
0
    public void Try_to_update_country_name_in_dictionary_for_non_existent_country()
    {
        var idcd = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 999, "Newlands");

        Assert.Equal(3, idcd.Count);
        Assert.Equal("United States of America", idcd[1]);
        Assert.Equal("Brazil", idcd[55]);
        Assert.Equal("India", idcd[91]);
    }
Пример #29
0
    public void Update_country_name_in_dictionary()
    {
        var idcd = DialingCodes.UpdateDictionary(
            DialingCodes.GetExistingDictionary(), 1, "Les États-Unis");

        Assert.Equal(3, idcd.Count);
        Assert.Equal("Les États-Unis", idcd[1]);
        Assert.Equal("Brazil", idcd[55]);
        Assert.Equal("India", idcd[91]);
    }
Пример #30
0
    public void Add_country_to_existing_dictionary()
    {
        var idcd = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal(4, idcd.Count);
        Assert.Equal("United States of America", idcd[1]);
        Assert.Equal("United Kingdom", idcd[44]);
        Assert.Equal("Brazil", idcd[55]);
        Assert.Equal("India", idcd[91]);
    }