public void MapResponseToRequest() { var mapper = new ApiProjectTriggerModelMapper(); var model = new ApiProjectTriggerResponseModel(); model.SetProperties("A", true, "A", "A", "A", "A"); ApiProjectTriggerRequestModel response = mapper.MapResponseToRequest(model); response.IsDisabled.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectId.Should().Be("A"); response.TriggerType.Should().Be("A"); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiProjectTriggerModelMapper mapper = new ApiProjectTriggerModelMapper(); UpdateResponse<ApiProjectTriggerResponseModel> updateResponse = await this.Client.ProjectTriggerUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }