<commit_before>﻿using BGC.Data.Relational;
using BGC.Data.Relational.Mappings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestUtils
{
    public class MockDtoFactory : IDtoFactory
    {
        TRelationalDto IDtoFactory.GetDtoFor<TRelationalDto, TEntity>(TEntity entity, RelationalPropertyMapper<TEntity, TRelationalDto> keyMapper)
        {
            return ActivateObject(typeof(TRelationalDto)) as TRelationalDto;
        }

        public virtual object ActivateObject(Type type)
        {
            return Activator.CreateInstance(type);
        }
    }
}<commit_msg>Changed the implementation of MockDtoFactory to instantiate DTOs with non-public default constructors, due to the change in DTO ctors' access modifiers introduced by a previous commit.<commit_after>﻿using BGC.Data.Relational;
using BGC.Data.Relational.Mappings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestUtils
{
    public class MockDtoFactory : IDtoFactory
    {
        TRelationalDto IDtoFactory.GetDtoFor<TRelationalDto, TEntity>(TEntity entity, RelationalPropertyMapper<TEntity, TRelationalDto> keyMapper)
        {
            return ActivateObject(typeof(TRelationalDto)) as TRelationalDto;
        }

        public virtual object ActivateObject(Type type)
        {
            return Activator.CreateInstance(type, nonPublic: true);
        }
    }
}
{'fraction_non_alphanumeric': 0.0728476821192053, 'fraction_numerical': 0.0, 'mean_word_length': 3.721875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2237523', 'n_tokens_mistral': 424, 'n_tokens_neox': 433, 'n_words': 103}