Exemplo n.º 1
0
        private static T MatchesMapped <T>(
            this T provider,
            PropertyInfo property,
            Type valueConverterType,
            QIriMapping qiriMapping,
            Iri term,
            Iri graph = null)
            where T : AttributePropertyMappingProvider
        {
            var qiriMappings = (qiriMapping != null ? new[] { qiriMapping } : Array.Empty <QIriMapping>());

            provider.GetTerm(qiriMappings).Should().Be(term);
            provider.GetGraph(qiriMappings).Should().Be(graph);
            provider.EntityType.Should().Be(property.DeclaringType);
            provider.Property.Should().BeSameAs(property);
            provider.ValueConverterType.Should().Be(valueConverterType);
            return(provider);
        }
Exemplo n.º 2
0
 internal static void MatchesMapped <TConverter>(this AttributeCollectionMappingProvider provider, PropertyInfo property, QIriMapping qiriMapping, Iri term, Iri graph = null, CollectionStorageModel storageModel = CollectionStorageModel.Simple)
 {
     provider.MatchesMapped(property, typeof(TConverter), qiriMapping, term, graph).StoreAs.Should().Be(storageModel);
 }
Exemplo n.º 3
0
        internal static void MatchesMapped <TEntity>(this AttributeEntityMappingProvider provider, QIriMapping qiriMapping, Iri term, Iri graph = null)
        {
            var qiriMappings = (qiriMapping != null ? new[] { qiriMapping } : Array.Empty <QIriMapping>());

            provider.GetTerm(qiriMappings).Should().Be(term);
            provider.GetGraph(qiriMappings).Should().Be(graph);
            provider.EntityType.Should().Be(typeof(TEntity));
        }
Exemplo n.º 4
0
 internal static void MatchesMapped <TConverter>(this AttributePropertyMappingProvider provider, PropertyInfo property, QIriMapping qiriMapping, Iri term, Iri graph = null)
 {
     provider.MatchesMapped(property, typeof(TConverter), qiriMapping, term, graph);
 }
Exemplo n.º 5
0
 public void Setup()
 {
     QIriMapping = new QIriMapping("prefix", new Iri("iri"));
 }