コード例 #1
0
    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);
    }
コード例 #2
0
    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]);
    }
コード例 #3
0
    public void Longest_country_name_for_empty_dictionary()
    {
        var longestCountryName = DialingCodes.FindLongestCountryName(
            DialingCodes.GetEmptyDictionary());

        Assert.Equal(string.Empty, longestCountryName);
    }
コード例 #4
0
    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]);
    }
コード例 #5
0
    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]);
    }
コード例 #6
0
    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);
    }
コード例 #8
0
    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]);
    }
コード例 #9
0
    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]);
    }
コード例 #10
0
    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);
    }
コード例 #11
0
    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]);
    }
コード例 #12
0
    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]);
    }
コード例 #13
0
    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]);
    }
コード例 #14
0
    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]);
    }
コード例 #15
0
    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]);
    }
コード例 #16
0
    public void Remove_country_from_dictionary_count_is_2()
    {
        var countryCodes = DialingCodes.RemoveCountryFromDictionary(
            DialingCodes.GetExistingDictionary(), 91);

        Assert.Equal(2, countryCodes.Count);
    }
コード例 #17
0
    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]);
    }
コード例 #18
0
    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);
    }
コード例 #19
0
    public void Add_country_to_existing_dictionary_91_is_India()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal("India", countryCodes[91]);
    }
コード例 #20
0
    public void Add_country_to_existing_dictionary_count_is_1()
    {
        var countryCodes = DialingCodes.AddCountryToExistingDictionary(
            DialingCodes.GetExistingDictionary(), 44, "United Kingdom");

        Assert.Equal(4, countryCodes.Count);
    }
コード例 #21
0
    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]);
    }