public void ConnectorDescriptionAttributeConstructorTest() { var target = new ConnectorDescriptionAttribute(); Assert.IsTrue(target.CanReadContacts); Assert.IsTrue(target.CanWriteContacts); Assert.IsTrue(target.CanRead(typeof(StdContact))); Assert.IsTrue(target.CanWrite(typeof(StdContact))); Assert.IsFalse(target.CanReadCalendarEntries); Assert.IsFalse(target.CanWriteCalendarEntries); Assert.IsFalse(target.CanRead(typeof(StdCalendarItem))); Assert.IsFalse(target.CanWrite(typeof(StdCalendarItem))); Assert.IsFalse(target.CanRead(typeof(StdCalendarItem))); Assert.IsFalse(target.CanWrite(typeof(StdCalendarItem))); }
public void ConnectorDescriptionAttributePropertySetterTest() { var target = new ConnectorDescriptionAttribute(); // READ CONTACTS target.CanReadContacts = false; Assert.IsFalse(target.CanReadContacts); Assert.IsFalse(target.CanRead(typeof(StdContact))); target.CanReadContacts = true; Assert.IsTrue(target.CanReadContacts); Assert.IsTrue(target.CanRead(typeof(StdContact))); target.CanReadContacts = false; Assert.IsFalse(target.CanReadContacts); Assert.IsFalse(target.CanRead(typeof(StdContact))); // WRITE CONTACTS target.CanWriteContacts = false; Assert.IsFalse(target.CanWriteContacts); Assert.IsFalse(target.CanWrite(typeof(StdContact))); target.CanWriteContacts = true; Assert.IsTrue(target.CanWriteContacts); Assert.IsTrue(target.CanWrite(typeof(StdContact))); target.CanWriteContacts = false; Assert.IsFalse(target.CanWriteContacts); Assert.IsFalse(target.CanWrite(typeof(StdContact))); // READ CALENDAR target.CanReadCalendarEntries = false; Assert.IsFalse(target.CanReadCalendarEntries); Assert.IsFalse(target.CanRead(typeof(StdCalendarItem))); target.CanReadCalendarEntries = true; Assert.IsTrue(target.CanReadCalendarEntries); Assert.IsTrue(target.CanRead(typeof(StdCalendarItem))); target.CanReadCalendarEntries = false; Assert.IsFalse(target.CanReadCalendarEntries); Assert.IsFalse(target.CanRead(typeof(StdCalendarItem))); // WRITE CALENDAR target.CanWriteCalendarEntries = false; Assert.IsFalse(target.CanWriteCalendarEntries); Assert.IsFalse(target.CanWrite(typeof(StdCalendarItem))); target.CanWriteCalendarEntries = true; Assert.IsTrue(target.CanWriteCalendarEntries); Assert.IsTrue(target.CanWrite(typeof(StdCalendarItem))); target.CanWriteCalendarEntries = false; Assert.IsFalse(target.CanWriteCalendarEntries); Assert.IsFalse(target.CanWrite(typeof(StdCalendarItem))); }