public void TestCreateReportType() { //GetItemResponse<ReportType> CreateReportType(GenericRequest req); var companyID = new Guid("e649e5e1-98c4-4601-a83c-4657028d0e17"); var userID = new Guid("1b477f9a-1170-4a53-af28-12eec6fb1310"); IImardaReport channel = ImardaProxyManager.Instance.IImardaReportProxy; var service = ImardaProxyManager.Instance.${Proxy}; ChannelInvoker.Invoke(delegate(out IClientChannel channel) { channel = service as IC var parameters = new ParamsForCreateReportType { CompanyID = companyID, UserID = userID, Name = "Travel", Version = "1.1", Definition = new FileInfo(@"C:\TeamImarda\Imarda360\Imarda360.Reports\SmartTrack_Report\vehicle\Location Report.rdl"), DataSourceReferences = "DataSource1|/Data Sources/TrackingDataSource" }; GetItemResponse<ReportType> resp = channel.CreateReportType(parameters.AsGenericRequest()); Assert.IsTrue(resp != null); Assert.IsTrue(resp.Status); Assert.IsTrue(resp.Item != null); } }
public void TestCreateReportTypeForExisting() { //GetItemResponse<ReportType> CreateReportType(GenericRequest req); var companyID = new Guid("e649e5e1-98c4-4601-a83c-4657028d0e17"); var userID = new Guid("1b477f9a-1170-4a53-af28-12eec6fb1310"); IImardaReport channel = ImardaProxyManager.Instance.IImardaReportProxy; var service = ImardaProxyManager.Instance.${Proxy}; ChannelInvoker.Invoke(delegate(out IClientChannel channel) { channel = service as IC var parameters = new ParamsForCreateReportType { CompanyID = companyID, UserID = userID, Name = "Travel", Version = "1", }; GetItemResponse<ReportType> resp = channel.CreateReportType(parameters.AsGenericRequest()); Assert.IsTrue(resp != null); Assert.IsTrue(resp.Status); Assert.IsTrue(resp.Item != null); } }