International Calling Connoisseur - Tests should check for correct handling of duplicate Add().
Aperta
- Lingua principale
- C#
- Stelle
- 427
- Fork
- 383
- Merge medio
- 2g 2h
- PR unite (30g)
- 5
Descrizione
Add() throws if the key is already in the dictionary. I saw a bunch of passing solutions that don't check for the key before calling Add().
In general, there's lots of ways for dictionaries to throw exceptions when you do naive-but-seemingly-reasonable things, and the "Intro-to-Dictionaries" text might want to call out the common ways to go wrong.
Example test:
var countryCodes = DialingCodes.AddCountryToExistingDictionary(DialingCodes.GetExistingDictionary(), 91, "India");
Assert.Equal("India", countryCodes[91]);
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.