public override void Refresh() { try { _sdataSingleResourceRequest = new SDataSingleResourceRequest(Service) { ResourceKind = tbSingleResourceKind.Text, ResourceSelector = tbSingleResourceSelector.Text }; tbSingleURL.Text = _sdataSingleResourceRequest.ToString(); } catch (SDataClientException ex) { MessageBox.Show(ex.Message); } }
public void SingleResource_Verify_ToStringWithResourceKindAndInclude() { var request = new SDataSingleResourceRequest(_service) { ResourceKind = "employees", ResourceSelector = "1", Include = "contact" }; var url = request.ToString(); Expect(url, Is.EqualTo("http://localhost:59213/sdata/aw/dynamic/-/employees(1)?include=contact")); }
public void SingleResource_Verify_ToStringWithResourceKind() { var request = new SDataSingleResourceRequest(_service) { ResourceKind = "employees", ResourceSelector = "id = '1234'" }; var url = request.ToString(); Expect(url, Is.EqualTo("http://localhost:59213/sdata/aw/dynamic/-/employees(id = '1234')")); }