public void IListClearShouldThrowException()
        {
            // arrange
            var source = new ObservableKeyedCollection<string, object>( o => o.ToString() );
            IList target = new ReadOnlyObservableKeyedCollection<string, object>( source );

            source.Add( new object() );

            // act
            Assert.Throws<NotSupportedException>( () => target.Clear() );

            // assert
        }
 public void ICollectionOfTClearShouldThrowException()
 {
     var source = new ObservableKeyedCollection<string, object>( o => o.ToString() );
     ICollection<object> target = new ReadOnlyObservableKeyedCollection<string, object>( source );
     source.Add( new object() );
     Assert.Throws<NotSupportedException>( () => target.Clear() );
 }