The ns-3 object creation will assign attribute values *after* the
object's constructor is called. If you are testing the value from
within the body of the constructor, you are too early in the object
lifecycle.
The manual chapter on Attributes explains this in more detail and
explains how to force this assignment early if you really need them
available in the body of the constructor.
- Tom