@@ -1384,7 +1384,7 @@ public void ShouldImportFromFileWithEnabledDatatypeDiscovery(string fileExtensio
13841384 }
13851385 //Test that automatic datatype discovery happened successfully
13861386 Assert . AreEqual ( RDFModelEnums . RDFDatatypes . XSD_STRING , RDFDatatypeRegister . GetDatatype ( $ "ex:mydt{ ( int ) format } ") . TargetDatatype ) ;
1387- Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydt{ ( int ) format } ") . Facets . Single ( ) is RDFPatternFacet
1387+ Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydt{ ( int ) format } ") . Facets [ 0 ] is RDFPatternFacet
13881388 {
13891389 Pattern : "^ex$"
13901390 } ) ;
@@ -1480,7 +1480,7 @@ public void ShouldImportFromStreamWithEnabledDatatypeDiscovery(RDFModelEnums.RDF
14801480 }
14811481 //Test that automatic datatype discovery happened successfully
14821482 Assert . AreEqual ( RDFModelEnums . RDFDatatypes . XSD_STRING , RDFDatatypeRegister . GetDatatype ( $ "ex:mydtT{ ( int ) format } ") . TargetDatatype ) ;
1483- Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydtT{ ( int ) format } ") . Facets . Single ( ) is RDFPatternFacet
1483+ Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydtT{ ( int ) format } ") . Facets [ 0 ] is RDFPatternFacet
14841484 {
14851485 Pattern : "^ex$"
14861486 } ) ;
@@ -1539,7 +1539,7 @@ public void ShouldImportFromDataTableWithEnabledDatatypeDiscovery()
15391539 Assert . IsTrue ( graph2 . Equals ( graph1 ) ) ;
15401540 //Test that automatic datatype discovery happened successfully
15411541 Assert . AreEqual ( RDFModelEnums . RDFDatatypes . XSD_STRING , RDFDatatypeRegister . GetDatatype ( "ex:mydtZ" ) . TargetDatatype ) ;
1542- Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( "ex:mydtZ" ) . Facets . Single ( ) is RDFPatternFacet { Pattern : "^ex$" } ) ;
1542+ Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( "ex:mydtZ" ) . Facets [ 0 ] is RDFPatternFacet { Pattern : "^ex$" } ) ;
15431543 }
15441544
15451545 [ TestMethod ]
@@ -1751,31 +1751,31 @@ public void ShouldExtractDatatypeDefinitionsFromGraph()
17511751
17521752 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:length6" , StringComparison . Ordinal )
17531753 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_STRING
1754- && dt . Facets . Single ( ) is RDFLengthFacet { Length : 6 } ) ) ;
1754+ && dt . Facets [ 0 ] is RDFLengthFacet { Length : 6 } ) ) ;
17551755 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:minlength6" , StringComparison . Ordinal )
17561756 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_STRING
1757- && dt . Facets . Single ( ) is RDFMinLengthFacet { Length : 6 } ) ) ;
1757+ && dt . Facets [ 0 ] is RDFMinLengthFacet { Length : 6 } ) ) ;
17581758 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:maxlength6" , StringComparison . Ordinal )
17591759 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_STRING
1760- && dt . Facets . Single ( ) is RDFMaxLengthFacet { Length : 6 } ) ) ;
1760+ && dt . Facets [ 0 ] is RDFMaxLengthFacet { Length : 6 } ) ) ;
17611761 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:maxinclusive6" , StringComparison . Ordinal )
17621762 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_DOUBLE
1763- && dt . Facets . Single ( ) is RDFMaxInclusiveFacet { InclusiveUpperBound : 6 } ) ) ;
1763+ && dt . Facets [ 0 ] is RDFMaxInclusiveFacet { InclusiveUpperBound : 6 } ) ) ;
17641764 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:mininclusive6" , StringComparison . Ordinal )
17651765 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_DOUBLE
1766- && dt . Facets . Single ( ) is RDFMinInclusiveFacet { InclusiveLowerBound : 6 } ) ) ;
1766+ && dt . Facets [ 0 ] is RDFMinInclusiveFacet { InclusiveLowerBound : 6 } ) ) ;
17671767 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:maxexclusive6" , StringComparison . Ordinal )
17681768 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_DOUBLE
1769- && dt . Facets . Single ( ) is RDFMaxExclusiveFacet { ExclusiveUpperBound : 6 } ) ) ;
1769+ && dt . Facets [ 0 ] is RDFMaxExclusiveFacet { ExclusiveUpperBound : 6 } ) ) ;
17701770 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:minexclusive6" , StringComparison . Ordinal )
17711771 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_DOUBLE
1772- && dt . Facets . Single ( ) is RDFMinExclusiveFacet { ExclusiveLowerBound : 6 } ) ) ;
1772+ && dt . Facets [ 0 ] is RDFMinExclusiveFacet { ExclusiveLowerBound : 6 } ) ) ;
17731773 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:aliasRational" , StringComparison . Ordinal )
17741774 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . OWL_RATIONAL
17751775 && dt . Facets . Count == 0 ) ) ;
17761776 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:patternex" , StringComparison . Ordinal )
17771777 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_STRING
1778- && dt . Facets . Single ( ) is RDFPatternFacet patternFacet
1778+ && dt . Facets [ 0 ] is RDFPatternFacet patternFacet
17791779 && string . Equals ( patternFacet . Pattern , "^ex" , StringComparison . Ordinal ) ) ) ;
17801780 Assert . IsTrue ( datatypes . Any ( dt => string . Equals ( dt . URI . ToString ( ) , "ex:integer" , StringComparison . Ordinal )
17811781 && dt . TargetDatatype == RDFModelEnums . RDFDatatypes . XSD_INTEGER
@@ -1933,7 +1933,7 @@ public async Task ShouldImportFromFileAsyncWithEnabledDatatypeDiscovery(string f
19331933 }
19341934 //Test that automatic datatype discovery happened successfully
19351935 Assert . AreEqual ( RDFModelEnums . RDFDatatypes . XSD_STRING , RDFDatatypeRegister . GetDatatype ( $ "ex:mydtK{ ( int ) format } ") . TargetDatatype ) ;
1936- Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydtK{ ( int ) format } ") . Facets . Single ( ) is RDFPatternFacet
1936+ Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydtK{ ( int ) format } ") . Facets [ 0 ] is RDFPatternFacet
19371937 {
19381938 Pattern : "^ex$"
19391939 } ) ;
@@ -2028,7 +2028,7 @@ public async Task ShouldImportFromStreamAsyncWithEnabledDatatypeDiscovery(RDFMod
20282028 }
20292029 //Test that automatic datatype discovery happened successfully
20302030 Assert . AreEqual ( RDFModelEnums . RDFDatatypes . XSD_STRING , RDFDatatypeRegister . GetDatatype ( $ "ex:mydtKK{ ( int ) format } ") . TargetDatatype ) ;
2031- Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydtKK{ ( int ) format } ") . Facets . Single ( ) is RDFPatternFacet
2031+ Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( $ "ex:mydtKK{ ( int ) format } ") . Facets [ 0 ] is RDFPatternFacet
20322032 {
20332033 Pattern : "^ex$"
20342034 } ) ;
@@ -2085,7 +2085,7 @@ public async Task ShouldImportFromDataTableAsyncWithEnabledDatatypeDiscovery()
20852085 Assert . IsTrue ( graph2 . Equals ( graph1 ) ) ;
20862086 //Test that automatic datatype discovery happened successfully
20872087 Assert . AreEqual ( RDFModelEnums . RDFDatatypes . XSD_STRING , RDFDatatypeRegister . GetDatatype ( "ex:mydtR" ) . TargetDatatype ) ;
2088- Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( "ex:mydtR" ) . Facets . Single ( ) is RDFPatternFacet { Pattern : "^ex$" } ) ;
2088+ Assert . IsTrue ( RDFDatatypeRegister . GetDatatype ( "ex:mydtR" ) . Facets [ 0 ] is RDFPatternFacet { Pattern : "^ex$" } ) ;
20892089 }
20902090
20912091 [ TestMethod ]
0 commit comments