private async Task <ActivityDTO> PerformInitialConfiguration() { //get the terminal configure URL string terminalConfigureUrl = GetTerminalConfigureUrl(); //prepare the create account action DTO var requestActionDTO = HealthMonitor_FixtureData.Post_To_Chatter_v1_InitialConfiguration_Fr8DataDTO(); //perform post request to terminal and return the result var resultActionDto = await HttpPostAsync <Fr8DataDTO, ActivityDTO>(terminalConfigureUrl, requestActionDTO); using (var crateStorage = Crate.GetUpdatableStorage(resultActionDto)) { crateStorage.UpdateControls <Post_To_Chatter_v1.ActivityUi>(x => { x.UseUserOrGroupOption.Selected = true; var selectedUser = x.UserOrGroupSelector.ListItems.First(y => y.Key == "Fr8 Admin"); x.UserOrGroupSelector.selectedKey = selectedUser.Key; x.UserOrGroupSelector.Value = selectedUser.Value; x.FeedTextSource.ValueSource = "specific"; x.FeedTextSource.TextValue = "IntegrationTestFeed"; }); } return(resultActionDto); }
public async Task Post_To_Chatter_Initial_Configuration_Without_AuthToken_Should_Fail() { //Arrange string terminalConfigureUrl = GetTerminalConfigureUrl(); //prepare the create lead action DTO var dataDTO = HealthMonitor_FixtureData.Post_To_Chatter_v1_InitialConfiguration_Fr8DataDTO(); dataDTO.ActivityDTO.AuthToken = null; //Act //perform post request to terminal and return the result var response = await HttpPostAsync <Fr8DataDTO, ActivityDTO>(terminalConfigureUrl, dataDTO); Assert.NotNull(response); Assert.NotNull(response.CrateStorage); Assert.NotNull(response.CrateStorage.Crates); Assert.True(response.CrateStorage.Crates.Any(x => x.ManifestType == "Standard Authentication")); }