public void GetJobFileStatusesTest() { var jobId = Guid.NewGuid(); var getJobFileStatusesRequest = new GetJobFileStatusesRequest(jobId, ""); var mockNetwork = new Mock <INetwork>(MockBehavior.Strict); mockNetwork .Setup(n => n.Invoke(getJobFileStatusesRequest)) .Returns(new MockHttpWebResponse( "SpectraLogic.SpectraRioBrokerClient.Test.TestFiles.GetJobFileStatusesResponse", HttpStatusCode.OK, null)); var mockBuilder = new Mock <ISpectraRioBrokerClientBuilder>(MockBehavior.Strict); mockBuilder .Setup(b => b.Build()) .Returns(new SpectraRioBrokerClient(mockNetwork.Object)); var builder = mockBuilder.Object; var client = builder.Build(); var jobFileStatus = client.GetJobFileStatuses(getJobFileStatusesRequest); Assert.AreEqual(3, jobFileStatus.FileStatusesList.Count); mockBuilder.VerifyAll(); mockNetwork.VerifyAll(); }
/// <inheritdoc/> public IFileStatuses GetJobFileStatuses(GetJobFileStatusesRequest request) { return(ExceptionDecorator.Run(() => new GetJobFileStatusesResponseParser().Parse(_network.Invoke(request)))); }