public void TemplateResource_Verify_CanRead() { var request = new SDataTemplateResourceRequest(_service) { ResourceKind = "employees" }; _mock.Setup(s => s.ReadEntry(request)).Returns(TestData.Entry); var entry = request.Read(); Expect(entry, Is.Not.Null); }
private void btnTemplateRead_Click(object sender, EventArgs e) { try { var entry = _sdataTemplateResourceRequest.Read(); if (entry == null) { templatePayloadGrid.SelectedObject = null; MessageBox.Show("$template not supported"); } else { // show it in the grid templatePayloadGrid.SelectedObject = entry.GetSDataPayload(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }