I was writing some unit tests for a custom type and everything was fine 
until I got to NullSafeSet:

        public void NullSafeSet(DbCommand cmd, object value, int index, 
ISessionImplementor session) {
            if (value == null) {
                ((IDataParameter)cmd.Parameters[index]).Value = 
DBNull.Value;
            } else {
                var yes = (bool)value;
                ((IDataParameter)cmd.Parameters[index]).Value = yes ? "Y" : 
"N";
            }
        }

It appears that on change NH-3431 there was a mass replace of the usage of 
System.Data classes to System.Data.Common classes.  The code moved from 
interfaces in the function signatures to concrete classes.  This makes it 
not possible to test this method, as far as I can tell, without actually 
trying to instantiate an instance of a command to pass into the method.

Does anyone have an idea of why this choice was made?  It is what it is at 
this point.  I'm just curious as to the reasoning.

- Robert

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to