public void WriteCustomAttributeChoiceLabelUsingAttributeDefinition() { Post post = new Post(_ctx.Listen360, TestUtil.GetElementForXml(_postXml)); ICustomAttributeDefinition attrDef = new FakeCustomAttributeDefinition(); post[attrDef] = "News"; Assert.AreEqual("News", post[attrDef]); }
public void ReadCustomAttributeChoiceLabelUsingAttributeDefinition() { Post post = new Post(_ctx.Listen360, TestUtil.GetElementForXml(_postXml)); ICustomAttributeDefinition attrDef = new FakeCustomAttributeDefinition(); Assert.AreEqual(1, attrDef.Ordinal); Assert.NotNull(post[attrDef]); Assert.AreEqual("Article", post[attrDef]); }