### .ownProperty(name)

Asserts that the target has an own property `name`.

expect('test').to.have.ownProperty('length');

@name ownProperty
@alias haveOwnProperty
@param {String} name
@param {String} message _optional_
@api public
198077
function assertOwnProperty (name, msg) {
    if (msg) flag(this, 'message', msg);
    var obj = flag(this, 'object');
    this.assert(
        obj.hasOwnProperty(name)
      , 'expected #{this} to have own property ' + _.inspect(name)
      , 'expected #{this} to not have own property ' + _.inspect(name)
    );
  }
632179
public void expectRange(String name, int minLength, int maxLength, String message) {
        String value = Optional.ofNullable(get(name)).orElse("");

        if (StringUtils.isNumeric(value)) {
            double doubleValue = Double.parseDouble(value);
            if (doubleValue < minLength || doubleValue > maxLength) {
                addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.RANGE_KEY.name(), name, minLength, maxLength)));
            }
        } else {
            if (value.length() < minLength || value.length() > maxLength) {
                addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.RANGE_KEY.name(), name, minLength, maxLength)));
            }
        }
    }
144768
function _defPrivateProperty(name, value) {
        if (instanceOf(value, Function)) value = value.bind(model)
        _privateProperties[name] = value
        $util.def(model, name, {
            enumerable: false,
            value: value
        })
    }
278277
function _hasOwnProperty(obj) {
    var key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            return true;
        }
    }

    return false;
}
425323
public void assertOne(final String propertyName,
            final PropertyList properties) throws ValidationException {

        if (properties.getProperties(propertyName).size() != 1) {
            throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {propertyName});
        }
    }
886065
function hasOwnProperty(value, key) {
  if (value.hasOwnProperty && isFunction(value.hasOwnProperty)) {
    return value.hasOwnProperty(key);
  }

  if (value.prototype && value.prototype.hasOwnProperty) {
    return value.prototype.hasOwnProperty(key);
  }

  return false;
}
981877
function Message () {

  if (!(this instanceof Message)) {
    if (typeof arguments[0] === 'object' && arguments[0] instanceof Message) {
      debug('message is a message so return it');
      return arguments[0];
    }
    else {
      debug('creating new message and initializing with arguments');
      var m = new Message();
      Message.prototype.initialize.apply(m, slice.call(arguments));
      return m;
    }
  }
  else {
    this.isMessage = true;
    if (arguments.length) {
      debug('initializing with arguments');
      Message.prototype.initialize.apply(this, slice.call(arguments));
    }
  }

}
835089
@Override
	public final void setObjectProperty(String name, Object value) throws JMSException
    {
        if (value == null)
            throw new MessageFormatException("A property value cannot be null");
            
        // Check type
        if (!(value instanceof Boolean ||
              value instanceof Byte ||
              value instanceof Short ||
              value instanceof Integer ||
              value instanceof Long ||
              value instanceof Float ||
              value instanceof Double ||
              value instanceof String))
            throw new MessageFormatException("Unsupported property value type : "+value.getClass().getName());
        
        setProperty(name,value);
    }
983992
public void setMessage(String message) {
        requireArgument(message != null && !message.isEmpty(), "Message cannot be null or empty.");
        this.message = message;
    }
785345
function set(target, propertyKey, V /* , receiver */) {
  var receiver = arguments.length < 4 ? target : arguments[3];
  var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
  var existingDescriptor, prototype;
  if (!ownDescriptor) {
    if (isObject(prototype = getPrototypeOf(target))) {
      return set(prototype, propertyKey, V, receiver);
    }
    ownDescriptor = createPropertyDescriptor(0);
  }
  if (has(ownDescriptor, 'value')) {
    if (ownDescriptor.writable === false || !isObject(receiver)) return false;
    if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {
      if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
      existingDescriptor.value = V;
      definePropertyModule.f(receiver, propertyKey, existingDescriptor);
    } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));
    return true;
  }
  return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);
}
1043015
public void setPayloadProperties(BaseMessage message, Object msg)
   {
       MessageDataDesc messageDataDesc = message.getMessageDataDesc(null);   // Top level only
       if (messageDataDesc != null)
       {
           Map<String,Class<?>> mapPropertyNames = messageDataDesc.getPayloadPropertyNames(null);
           if (mapPropertyNames != null)
           {
               for (String strKey : mapPropertyNames.keySet())
               {
                   Class<?> classKey = mapPropertyNames.get(strKey);
                   this.setPayloadProperty(message, msg, strKey, classKey);
               }
           }
       }
       if (message.get("Version") == null)
           this.setPayloadProperty(DEFAULT_VERSION, msg, "Version", Float.class);
       this.setPayloadProperty(this.getTimeStamp(), msg, "TimeStamp", org.joda.time.DateTime.class); // Current timestamp
   }
471959
private static String constructMessage(String property, 
                                         String newVal, String oldVal) {
    String message = "Could not change property " + property;
    if (oldVal != null) {
      message += " from \'" + oldVal;
    }
    if (newVal != null) {
      message += "\' to \'" + newVal + "\'";
    }
    return message;
  }
1000652
protected void handleInboundMessageProperties(final MessageContext messageContext,
                                                  final SoapMessage message) {
        if (messageContext == null) { return; }
        
        final String[] propertyNames = messageContext.getPropertyNames();
        if (propertyNames != null) {
            for (final String propertyName : propertyNames) {
                message.setHeader(propertyName, messageContext.getProperty(propertyName));
            }
        }
    }
1092072
function(message) {
    if (!_.isObject(message)) {
      message = {
        message: message
      };
    }

    try {
      message = JSON.stringify(_.defaultsDeep({}, message, this.config.defaultProps));
    } catch (e) {
      return this.logger.error('Logmatic - error while parsing log message. Not sending', e);
    }

    if (this.isConnected) {
      this.sendMessage(message);
    } else {
      this.messageBuffer.push(message);
    }
  }
1006865
function(name) {
      var props = this.jCal[PROPERTY_INDEX];
      var len = props.length;

      var i = 0;
      for (; i < len; i++) {
        // 0 is property name
        if (props[i][NAME_INDEX] === name) {
          return true;
        }
      }

      return false;
    }
417091
def _validate(self, msg):
    
    if not isinstance(msg, self._message_type):
      raise TypeError('Expected a %s instance for %s property',
                      self._message_type.__name__,
                      self._code_name or self._name)
1217218
public boolean hasProperty(String name) {
        for (SyntheticProperty prop : mPropertyList) {
            if (prop.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }