/// <summary> /// Process the projection asynchronously and return the end state of the projection /// </summary> /// <param name="projectionToProcess"> /// The projection to run /// </param> /// <returns> /// The sequence number up until which the projection was run /// </returns> public async Task <IProjectionResponse> ProcessAsync(IProjectionUntyped projectionToProcess, OrchestrationCallbackIdentity responseSource = null) { await Process(projectionToProcess); return(ProjectionResponse.Create(projectionToProcess, responseSource)); }
public void GetValuesAsArray_NotNull_TestMethod() { ProjectionResponse projResp = ProjectionResponse.Create(Mocking.Mocking.GetProjectionUntyped()); JArray testArray = projResp.Values; Assert.IsNotNull(testArray); }
public void GetValuesAsArray_AccountMatch_TestMethod() { string expected = "Acct.1"; string actual = "Not set"; ProjectionResponse projResp = ProjectionResponse.Create(Mocking.Mocking.GetProjectionUntyped()); JArray testArray = projResp.Values; Mocking.Mocking.MockBalanceResponse testItem = testArray.First.ToObject <Mocking.Mocking.MockBalanceResponse>(); if (null != testItem) { actual = testItem.AccountNumber; } Assert.AreEqual(expected, actual); }
public void GetValuesAsArray_ValueMatch_TestMethod() { decimal expected = 70.0M; decimal actual = -1.9M; ProjectionResponse projResp = ProjectionResponse.Create(Mocking.Mocking.GetProjectionUntyped()); JArray testArray = projResp.Values; Mocking.Mocking.MockBalanceResponse testItem = testArray.First.ToObject <Mocking.Mocking.MockBalanceResponse>(); if (null != testItem) { actual = testItem.Balance; } Assert.AreEqual(expected, actual); }
public void Constructor_TestMethod() { ProjectionResponse testObj = ProjectionResponse.Create(Mocking.Mocking.GetProjectionUntyped()); Assert.IsNotNull(testObj); }