New test.
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / TagPrefixCollection.cs
index c5802783d419101864fffc3e07f37e17191ce947..5f71b034ba64a96bc6153819e781486b4241379b 100644 (file)
@@ -62,10 +62,9 @@ namespace System.Web.Configuration
 
                protected override ConfigurationElement CreateNewElement ()
                {
-                       return new TagPrefixInfo ("", "", "", "", "");
+                       return new TagPrefixInfo ();
                }
 
-               [MonoTODO]
                protected override object GetElementKey (ConfigurationElement element)
                {
                        return ((TagPrefixInfo)element).TagPrefix;
@@ -73,21 +72,17 @@ namespace System.Web.Configuration
 
                public void Remove (TagPrefixInfo tagPrefixInformation)
                {
-                       BaseRemove (tagPrefixInformation);
+                       BaseRemove (tagPrefixInformation.TagPrefix);
                }
 
-               [MonoTODO]
-               protected override ConfigurationElementCollectionType CollectionType {
-                       get {
-                               return ConfigurationElementCollectionType.BasicMap;
-                       }
+               [MonoTODO ("why override this?")]
+               public override ConfigurationElementCollectionType CollectionType {
+                       get { return ConfigurationElementCollectionType.BasicMap; }
                }
 
-               [MonoTODO]
+               [MonoTODO ("why override this?")]
                protected override string ElementName {
-                       get {
-                               throw new NotImplementedException ();
-                       }
+                       get { return "add"; }
                }
 
                protected override ConfigurationPropertyCollection Properties {
@@ -95,10 +90,8 @@ namespace System.Web.Configuration
                }
 
                public TagPrefixInfo this[int index] {
-                       get { return (TagPrefixInfo) BaseGet (index);
-                       }
-                       [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       get { return (TagPrefixInfo) BaseGet (index); }
+                       set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
                }
 
                protected override bool ThrowOnDuplicate {