@@ -1791,7 +1791,7 @@ public void ExposeInternalParamsWithoutDefaultValueTest(ConnectorCompatibility c
1791
1791
{
1792
1792
Compatibility = compatibility ,
1793
1793
AllowUnsupportedFunctions = true ,
1794
- IncludeInternalFunctions = true ,
1794
+ IncludeInternalFunctions = true ,
1795
1795
IncludeWebhookFunctions = true ,
1796
1796
ExposeInternalParamsWithoutDefaultValue = exposeInternalParamsWithoutDefaultValue
1797
1797
} ;
@@ -1837,6 +1837,36 @@ public async Task SendEmail()
1837
1837
Assert . Single ( functions . Where ( x => x . Name == "SendEmailV3" ) ) ;
1838
1838
}
1839
1839
1840
+ [ Fact ]
1841
+ public async Task AiSensitivityTest ( )
1842
+ {
1843
+ using LoggingTestServer testConnector = new LoggingTestServer ( @"Swagger\SendMail.json" , _output ) ;
1844
+ OpenApiDocument apiDoc = testConnector . _apiDocument ;
1845
+
1846
+ ConnectorSettings connectorSettings = new ConnectorSettings ( "exob" )
1847
+ {
1848
+ Compatibility = ConnectorCompatibility . SwaggerCompatibility ,
1849
+ AllowUnsupportedFunctions = true ,
1850
+ IncludeInternalFunctions = true ,
1851
+ ReturnUnknownRecordFieldsAsUntypedObjects = true
1852
+ } ;
1853
+
1854
+ List < ConnectorFunction > functions = OpenApiParser . GetFunctions ( connectorSettings , apiDoc ) . OrderBy ( f => f . Name ) . ToList ( ) ;
1855
+
1856
+ ConnectorFunction sendmail = functions . First ( f => f . Name == "SendEmailV3" ) ;
1857
+ IEnumerable < ConnectorParameter > parameters = sendmail . RequiredParameters . Union ( sendmail . OptionalParameters ) ;
1858
+
1859
+ string unknownAiSensitivity = string . Join ( ", " , parameters . Where ( p => p . AiSensitivity == AiSensitivity . Unknown ) . Select ( p => p . Name ) ) ;
1860
+ string noAiSensitivity = string . Join ( ", " , parameters . Where ( p => p . AiSensitivity == AiSensitivity . None ) . Select ( p => p . Name ) ) ;
1861
+ string lowAiSensitivity = string . Join ( ", " , parameters . Where ( p => p . AiSensitivity == AiSensitivity . Low ) . Select ( p => p . Name ) ) ;
1862
+ string highAiSensitivity = string . Join ( ", " , parameters . Where ( p => p . AiSensitivity == AiSensitivity . High ) . Select ( p => p . Name ) ) ;
1863
+
1864
+ Assert . Equal ( string . Empty , unknownAiSensitivity ) ;
1865
+ Assert . Equal ( "subject, text, toname, ccname, bccname, files, filenames" , noAiSensitivity ) ;
1866
+ Assert . Equal ( string . Empty , lowAiSensitivity ) ;
1867
+ Assert . Equal ( "to, cc, bcc" , highAiSensitivity ) ;
1868
+ }
1869
+
1840
1870
[ Fact ]
1841
1871
public async Task ExcelOnlineTest ( )
1842
1872
{
0 commit comments