Beispiel #1
0
        internal IReadOnlyCollection <TEntity> RunTranslationModelToEntityTest <TModel, TEntity>(IReadOnlyCollection <object> translators, IReadOnlyCollection <TModel> toTranslate, IUnitOfWork unitOfWork = null) where TEntity : class where TModel : class
        {
            ResolveManager.RegisterInstances(translators);
            var translations = TranslationManagerVModels.TranslateAll <TModel, TEntity>(toTranslate, unitOfWork);

            translations.Count.Should().Be(toTranslate.Count);
            return(translations);
        }
Beispiel #2
0
        internal IReadOnlyCollection <TModel> RunTranslationEntityToModelTest <TEntity, TModel>(IReadOnlyCollection <object> translators, IReadOnlyCollection <TEntity> toTranslate) where TEntity : class where TModel : class
        {
            ResolveManager.RegisterInstances(translators);
            var translations = TranslationManagerEntities.TranslateAll <TEntity, TModel>(toTranslate.AsQueryable());

            translations.Count.Should().Be(toTranslate.Count);
            return(translations);
        }