public async Task ApiHubTableClientBindingTest() { var textArgValue = ApiHubTestHelper.NewRandomString(); // Ensure the test entity exists. await ApiHubTestHelper.EnsureEntityAsync(ApiHubTestHelper.EntityId1); // Test table client binding. await Fixture.Host.CallAsync("ApiHubTableClient", new Dictionary <string, object>() { { ApiHubTestHelper.TextArg, textArgValue } }); await ApiHubTestHelper.AssertTextUpdatedAsync( textArgValue, ApiHubTestHelper.EntityId1); }
public async Task ApiHubTableEntityOut() { var textArgValue = ApiHubTestHelper.NewRandomString(); // Delete the test entity if it exists. await ApiHubTestHelper.DeleteEntityAsync(ApiHubTestHelper.EntityId5); // Test table entity out binding. JObject input = new JObject { { "table", "SampleTable" }, { "value", textArgValue } }; await Fixture.Host.CallAsync("ApiHubTableEntityOut", new Dictionary <string, object>() { { "input", input.ToString() } }); await ApiHubTestHelper.AssertTextUpdatedAsync( textArgValue, ApiHubTestHelper.EntityId5); }
public async Task ApiHubTableEntityBindingTest() { var textArgValue = ApiHubTestHelper.NewRandomString(); // Ensure the test entity exists. await ApiHubTestHelper.EnsureEntityAsync(ApiHubTestHelper.EntityId3); // Test table entity binding. TestInput input = new TestInput { Id = ApiHubTestHelper.EntityId3, Value = textArgValue }; await Fixture.Host.CallAsync("ApiHubTableEntity", new Dictionary <string, object>() { { "input", JsonConvert.SerializeObject(input) } }); await ApiHubTestHelper.AssertTextUpdatedAsync( textArgValue, ApiHubTestHelper.EntityId3); }