public FileStreamResult Get(string assembly, string resource, string folders) { SetFromQueryStringIfEmpty(ref assembly, nameof(assembly)); SetFromQueryStringIfEmpty(ref resource, nameof(resource)); SetFromQueryStringIfEmpty(ref folders, nameof(folders)); return(EmbeddedResource.Get(assembly, resource, folders)); }
public void ThrowsSoapFaultWhenFault() { string xml = EmbeddedResource.Get <CreateReportResponseTests>("SoapFaultResponse.txt"); CreateReportResponse sut = new CreateReportResponse(); var soapFaultException = Assert.Throws <SoapFaultException>(() => sut.LoadFromXml(xml)); Assert.NotNull(soapFaultException.SoapFault); }
public void ParseResponse() { string xml = EmbeddedResource.Get <GetPicklistKeywordsResponseTests>("GetPicklistKeywordsResponse.txt"); GetPicklistKeywordsResponse sut = new GetPicklistKeywordsResponse(); sut.LoadFromXml(xml); Assert.NotEmpty(sut.Values); }
private XDocument getTemplate(string deviceName) { var resourceName = "DVST_" + deviceName; if (EmbeddedResource.Contains(resourceName)) { using (Stream source = EmbeddedResource.Get(resourceName)) return(XDocument.Load(source)); } return(null); }
public void ParseResponse() { string xml = EmbeddedResource.Get <CreateReportResponseTests>("CreateResponse.txt"); CreateReportResponse sut = new CreateReportResponse(); sut.LoadFromXml(xml); Assert.Equal("Control4222019144914-embcTraining-159742987459901082006", sut.Fields["reportId"]); Assert.Equal("Control4222019144914-embcTraining-159742987459901082006", sut.Fields["id"]); Assert.Equal("resource_request", sut.Fields["reportType"]); }
public void EmbeddedResource_RetrieveResource() { var sql = EmbeddedResource.Get("DataPointBatchClient.Scripts.InsertPatient.sql"); Assert.AreNotEqual(sql, null); }
protected BatchDestinationRepository(string resourcePath, CancellationToken token) { Query = EmbeddedResource.Get(resourcePath); _token = token; }
public HttpCachedEmbeddedFile(string path) : base(path, EmbeddedResource.Get(path)) { this.embedded = true; this.LastModified = DateTime.UtcNow; }