public void TestSendGridLinearMessage() { ComplexMessageContent complexMessageContent = new ComplexMessageContent("Grid线性消息概要", ComplexMessageType.Linear); TitleLinearComplexMessageContentItem title = new TitleLinearComplexMessageContentItem("Grid标题"); TextLinearComplexMessageContentItem hint = new TextLinearComplexMessageContentItem("Grid提示"); GridContent gridContent = new GridContent(2); gridContent.AddColumn(new Column("姓名", Alignment.Center, 40)); gridContent.AddColumn(new Column("部门", Alignment.Left, 60)); gridContent.AddData(new String[] { "张三", "云应用平台部" }); gridContent.AddData(new String[] { "李四", "云应用体验部" }); GridLinearComplexMessageContentItem grid = new GridLinearComplexMessageContentItem(gridContent); complexMessageContent.AddMessageContentItem(title).AddMessageContentItem(grid).AddMessageContentItem(hint); SendMessageResult result = _messageClient.SendSingleMessage(complexMessageContent, new PersonMessageReceiver("zhongt", "钟涛")); Assert.AreEqual(true, result.Success); }