Ejemplo n.º 1
0
        public void TestEquals()
        {
            PropertyId propertyId = new PropertyId("P42");

            Assert.True(propertyId.Equals(new PropertyId("P42")));
            Assert.False(propertyId.Equals(new PropertyId("P123")));
        }
        public PropertySomeValueSnak(PropertyId propertyId)
        {
            if (propertyId == null)
            {
                throw new ArgumentNullException("The property id must not be null");
            }

            PropertyId = propertyId;
        }
Ejemplo n.º 3
0
        public PropertyValueSnak(PropertyId propertyId, DataValue value)
        {
            if (propertyId == null || value == null)
            {
                throw new ArgumentNullException("The property id and value must not be null");
            }

            PropertyId = propertyId;
            Value = value;
        }
Ejemplo n.º 4
0
 public Property(PropertyId id = null, Fingerprint fingerprint = null, List<Statement> statements = null)
 {
     Id = id;
     Fingerprint = fingerprint == null ? new Fingerprint() : fingerprint;
     Statements = statements == null ? new List<Statement>() : statements;
 }
Ejemplo n.º 5
0
 public void TestValidSerialization()
 {
     PropertyId PropertyId = new PropertyId("P42");
     Assert.Equal("P42", PropertyId.Serialization);
 }