public async Task Get_Google_Sheet_Data_v1_FollowupConfiguration_Row_And_Column_Table() { var configureUrl = GetTerminalConfigureUrl(); HealthMonitor_FixtureData fixture = new HealthMonitor_FixtureData(); var requestActionDTO = fixture.Get_Google_Sheet_Data_v1_Followup_Configuration_Request_ActivityDTO_With_Crates(); ////Act fixture.Get_Google_Sheet_Data_v1_AddPayload(requestActionDTO, "Row_And_Column"); var dataDTO = new Fr8DataDTO { ActivityDTO = requestActionDTO }; //As the ActionDTO is preconfigured configure url actually calls the follow up configuration var responseActionDTO = await HttpPostAsync <Fr8DataDTO, ActivityDTO>( configureUrl, dataDTO ); //Assert Assert.NotNull(responseActionDTO); Assert.NotNull(responseActionDTO.CrateStorage); var crateStorage = Crate.FromDto(responseActionDTO.CrateStorage); Assert.AreEqual(1, crateStorage.Count); Assert.AreEqual(1, crateStorage.CratesOfType <StandardConfigurationControlsCM>().Count()); // Due to performance issue, remove functionalilty to load table contents // Assert.AreEqual("(2,1)", crateStorage.CratesOfType<StandardTableDataCM>().Single().Content.Table[0].Row[0].Cell.Value); //Assert.AreEqual("(2,2)", crateStorage.CratesOfType<StandardTableDataCM>().Single().Content.Table[0].Row[1].Cell.Value); }
public async Task Get_Google_Sheet_Data_v1_FollowupConfiguration_Row_Only_Table() { var configureUrl = GetTerminalConfigureUrl(); HealthMonitor_FixtureData fixture = new HealthMonitor_FixtureData(); var requestActionDTO = fixture.Get_Google_Sheet_Data_v1_Followup_Configuration_Request_ActivityDTO_With_Crates(); ////Act fixture.Get_Google_Sheet_Data_v1_AddPayload(requestActionDTO, "Row_Only"); var dataDTO = new Fr8DataDTO { ActivityDTO = requestActionDTO }; //As the ActionDTO is preconfigured configure url actually calls the follow up configuration var responseActionDTO = await HttpPostAsync <Fr8DataDTO, ActivityDTO>( configureUrl, dataDTO ); //Assert Assert.NotNull(responseActionDTO); Assert.NotNull(responseActionDTO.CrateStorage); var crateStorage = Crate.FromDto(responseActionDTO.CrateStorage); Assert.AreEqual(1, crateStorage.Count); Assert.AreEqual(1, crateStorage.CratesOfType <StandardConfigurationControlsCM>().Count()); }
public async Task Get_Google_Sheet_Data_v1_Run_OneRow_ResponseContainsExtractedFields() { //Arrange var runUrl = GetTerminalRunUrl(); HealthMonitor_FixtureData fixture = new HealthMonitor_FixtureData(); var requestActionDTO = fixture.Get_Google_Sheet_Data_v1_Followup_Configuration_Request_ActivityDTO_With_Crates(); fixture.Get_Google_Sheet_Data_v1_AddPayload(requestActionDTO, "OneRow_WithHeader"); var dataDTO = new Fr8DataDTO { ActivityDTO = requestActionDTO }; AddOperationalStateCrate(dataDTO, new OperationalStateCM()); ////Act var response = await HttpPostAsync <Fr8DataDTO, PayloadDTO>(runUrl, dataDTO); var storage = Crate.GetStorage(response); var tableDataCrate = storage.CratesOfType <StandardTableDataCM>().Single(); ////Assert Assert.AreEqual("Spreadsheet Data from \"OneRow_WithHeader\"", tableDataCrate.Label); }