public void GetIndexedArgumentValue() { ConstructorArgumentValues values = new ConstructorArgumentValues(); Assert.IsNull(values.GetIndexedArgumentValue(0, typeof(object)), "Mmm... managed to get a non null instance back from an empty instance."); values.AddIndexedArgumentValue(16, DBNull.Value, typeof(DBNull).FullName); Assert.IsNull(values.GetIndexedArgumentValue(0, typeof(object)), "Mmm... managed to get a non null instance back from an instance that should have now't at the specified index."); ConstructorArgumentValues.ValueHolder value = values.GetIndexedArgumentValue(16, typeof(DBNull)); Assert.IsNotNull(value, "Stored a value at a specified index, but got null when retrieving it."); Assert.AreSame(DBNull.Value, value.Value, "The value stored at the specified index was not the exact same instance as was added."); ConstructorArgumentValues.ValueHolder wrongValue = values.GetIndexedArgumentValue(16, typeof(string)); Assert.IsNull(wrongValue, "Stored a value at a specified index, and got it (or rather something) back when retrieving it with the wrong Type specified."); }