public void TestPropertyNames() { EscherProperty p1 = new EscherSimpleProperty(EscherProperties.GROUPSHAPE__SHAPENAME, 0); Assert.AreEqual("groupshape.shapename", p1.Name); Assert.AreEqual(EscherProperties.GROUPSHAPE__SHAPENAME, p1.PropertyNumber); Assert.IsFalse(p1.IsComplex); EscherProperty p2 = new EscherComplexProperty( EscherProperties.GROUPSHAPE__SHAPENAME, false, new byte[10]); Assert.AreEqual("groupshape.shapename", p2.Name); Assert.AreEqual(EscherProperties.GROUPSHAPE__SHAPENAME, p2.PropertyNumber); Assert.IsTrue(p2.IsComplex); Assert.IsFalse(p2.IsBlipId); EscherProperty p3 = new EscherComplexProperty( EscherProperties.GROUPSHAPE__SHAPENAME, true, new byte[10]); Assert.AreEqual("groupshape.shapename", p3.Name); Assert.AreEqual(EscherProperties.GROUPSHAPE__SHAPENAME, p3.PropertyNumber); Assert.IsTrue(p3.IsComplex); Assert.IsTrue(p3.IsBlipId); }
/// <summary> /// Returns true if one escher property is equal to another. /// </summary> /// <param name="o">The o.</param> /// <returns></returns> public override bool Equals(Object o) { if (this == o) { return(true); } if (!(o is EscherSimpleProperty)) { return(false); } EscherSimpleProperty escherSimpleProperty = (EscherSimpleProperty)o; if (propertyValue != escherSimpleProperty.propertyValue) { return(false); } if (Id != escherSimpleProperty.Id) { return(false); } return(true); }