public void IsWorkViewAttributeNotOptional() { var nameProperty = typeof(Person).GetProperty("Name"); Assert.IsFalse(WorkViewAttributeAttribute.IsOptional(nameProperty)); }
public void IsWorkViewAttributeOptional() { var bfProperty = typeof(Person).GetProperty("BestfriendName"); Assert.IsTrue(WorkViewAttributeAttribute.IsOptional(bfProperty)); }
public void IsWorkViewAttributeDefined() { var dobProperty = typeof(Person).GetProperty("Name"); Assert.IsTrue(WorkViewAttributeAttribute.IsDefined(dobProperty)); }
public void IsWorkViewAttributeNotDefined() { var dobProperty = typeof(Person).GetProperty("Birthday"); Assert.IsFalse(WorkViewAttributeAttribute.IsDefined(dobProperty)); }
public void UndefinedAttributeAddress() { var nameProperty = typeof(Person).GetProperty("Name"); Assert.AreEqual("Name", WorkViewAttributeAttribute.GetStringAddress(nameProperty)); }
public void DefinedAttributeAddress() { var ageProperty = typeof(Person).GetProperty("Age"); Assert.AreEqual("Parent.Age", WorkViewAttributeAttribute.GetStringAddress(ageProperty)); }