public ConveyancingMatter MapFromActionstepTypes(
            GetActionResponse actionResponse,
            ListActionParticipantsResponse participantsResponse,
            ListDataCollectionRecordValuesResponse dataCollectionsResponse)
        {
            if (actionResponse is null)
            {
                throw new ArgumentNullException(nameof(actionResponse));
            }

            var wCAConveyancingMatter = new ConveyancingMatter();

            var action = actionResponse.Action;

            wCAConveyancingMatter.Id            = action.Id;
            wCAConveyancingMatter.Name          = action.Name;
            wCAConveyancingMatter.ActionType    = actionResponse.ActionTypeName;
            wCAConveyancingMatter.FileReference = action.Reference;
            wCAConveyancingMatter.Conveyancers.AddRange(GetParticipants(participantsResponse, "Conveyancer"));
            wCAConveyancingMatter.Buyers.AddRange(GetParticipants(participantsResponse, "Buyer"));
            wCAConveyancingMatter.IncomingBanks.AddRange(GetParticipants(participantsResponse, "Bank_Incoming"));
            wCAConveyancingMatter.OthersideSolicitor.AddRange(GetParticipants(participantsResponse, "Otherside_Solicitor"));
            wCAConveyancingMatter.OthersideSolicitorPrimaryContact.AddRange(GetParticipants(participantsResponse, "Otherside_Solicitor_Primary_Contact"));

            wCAConveyancingMatter.PropertyDetails = new PropertyDetails
            {
                TitleReference = dataCollectionsResponse?["property", "titleref"],
                LotNo          = dataCollectionsResponse["property", "lotno"]
            };

            ConveyancingType conveyancingType;
            var isConveyancingTypeParseSuccess = Enum.TryParse <ConveyancingType>(dataCollectionsResponse["convdet", "ConveyType"], out conveyancingType);

            if (!isConveyancingTypeParseSuccess)
            {
                conveyancingType = ConveyancingType.None;
            }
            wCAConveyancingMatter.ConveyancingType = conveyancingType;

            var stringSettlementDate = dataCollectionsResponse["keydates", "smtdateonly"];

            if (!String.IsNullOrEmpty(stringSettlementDate))
            {
                var pattern = LocalDatePattern.Create("yyyy-MM-dd", CultureInfo.InvariantCulture);
                wCAConveyancingMatter.SettlementDate = pattern.Parse(stringSettlementDate).Value;
            }

            wCAConveyancingMatter.SettlementBookingTime = dataCollectionsResponse["convdet", "smttime"];

            return(wCAConveyancingMatter);
        }
        void ShouldMapFromValidActionstepTypes()
        {
            // Given
            var actionstepToWCAMapper = new ActionstepToWCAMapper();
            var actionResponse        = new GetActionResponse
            {
                Action = new ActionstepAction
                {
                    Id   = 123,
                    Name = "Test matter name"
                }
            };

            var participantsResponse = new ListActionParticipantsResponse();

            participantsResponse.ActionParticipants.AddRange(new List <ActionParticipant>
            {
                new ActionParticipant
                {
                    Id = "aabb",
                },
                new ActionParticipant
                {
                    Id = "ccdd",
                }
            });

            var dataCollectionsResponse = new ListDataCollectionRecordValuesResponse
            {
                DataCollectionRecordValues = new List <DataCollectionRecordValue>
                {
                    new DataCollectionRecordValue
                    {
                        Id          = "dc-id1",
                        StringValue = "dc-val1"
                    }
                }
            };


            // When
            var wcaMatter = actionstepToWCAMapper.MapFromActionstepTypes(actionResponse, participantsResponse, dataCollectionsResponse);

            // Then
            Assert.Equal(actionResponse.Action.Id, wcaMatter.Id);
        }