Added new class ObservableDictionary to the collection class library; 100% test coverage for the new ObservableDictionary class; fixed some minor issues with the code of ObservableCollection and ReadOnlyDictionary
git-svn-id: file:///srv/devel/repo-conversion/nusu@117 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
f0498fbb60
commit
b90ff1c78b
7 changed files with 966 additions and 16 deletions
|
|
@ -188,7 +188,7 @@ namespace Nuclex.Support.Collections {
|
|||
/// Add() method is called via the generic IDictionary<> interface
|
||||
/// </summary>
|
||||
[Test, ExpectedException(typeof(NotSupportedException))]
|
||||
public void TestThrowOnAddAtViaGenericIDictionary() {
|
||||
public void TestThrowOnAddViaGenericIDictionary() {
|
||||
Dictionary<int, string> numbers = createTestDictionary();
|
||||
ReadOnlyDictionary<int, string> testDictionary = makeReadOnly(numbers);
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
/// <summary>
|
||||
/// Checks whether the read only dictionary will throw an exception if its
|
||||
/// Clear() method is used via the generic ICollection<> interface
|
||||
/// Remove() method is used via the generic ICollection<> interface
|
||||
/// </summary>
|
||||
[Test, ExpectedException(typeof(NotSupportedException))]
|
||||
public void TestThrowOnRemoveViaGenericICollection() {
|
||||
|
|
@ -396,7 +396,7 @@ namespace Nuclex.Support.Collections {
|
|||
ReadOnlyDictionary<int, string> testDictionary = makeReadOnly(numbers);
|
||||
|
||||
(testDictionary as ICollection<KeyValuePair<int, string>>).Remove(
|
||||
new KeyValuePair<int, string>(24, "twenty-four")
|
||||
new KeyValuePair<int, string>(42, "fourty-two")
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue