[tests] add tests for the various Network constructors
This commit is contained in:
Родитель
cd8e4a6f41
Коммит
d3c5cececd
|
@ -224,6 +224,11 @@ namespace Introspection {
|
|||
case "ABMutableMultiValue":
|
||||
case "SecProtocolMetadata": // Read-only object that is surfaced during TLS negotiation callbacks, can not be created from user code.
|
||||
case "SecProtocolOptions": // Read-only object that is surfaced during TLS negotiation callbacks, can not be created from user code.
|
||||
case "NWError": // Only ever surfaced, not created from usercode
|
||||
case "NWInterface": // Only ever surfaced, not created from usercode
|
||||
case "NWPath": // Only ever surfaced, not created from usercode
|
||||
case "NWProtocolStack": // Only ever surfaced, not created from usercode
|
||||
case "NWProtocolMetadata": // While technically it can be created and the header files claim the methods exists, the library is missing the methods (radar: 42443077)
|
||||
case "ABSource": // not skipped when running on iOS 6.1
|
||||
// type was removed in iOS 10 (and replaced) and never consumed by other API
|
||||
case "CGColorConverter":
|
||||
|
@ -418,6 +423,26 @@ namespace Introspection {
|
|||
new CVPixelBufferPoolSettings (),
|
||||
new CVPixelBufferAttributes (CVPixelFormatType.CV24RGB, 100, 50)
|
||||
);
|
||||
case "NWAdvertiseDescriptor":
|
||||
return new NWAdvertiseDescriptor ("sampleName" + DateTime.Now);
|
||||
case "NWConnection": {
|
||||
var endpoint = NWEndpoint.Create ("www.microsoft.com", "https");
|
||||
var parameters = NWParameters.CreateTcp (configureTcp: null);
|
||||
return new NWConnection (endpoint, parameters);
|
||||
}
|
||||
case "NWContentContext":
|
||||
return new NWContentContext ("contentContext" + DateTime.Now);
|
||||
case "NWEndpoint":
|
||||
return NWEndpoint.Create ("www.microsoft.com", "https");
|
||||
case "NWListener":
|
||||
return NWListener.Create (NWParameters.CreateTcp (configureTcp: null));
|
||||
case "NWParameters":
|
||||
return NWParameters.CreateTcp (configureTcp: null);
|
||||
case "NWProtocolDefinition":
|
||||
// Makes a new instance every time
|
||||
return NWProtocolDefinition.TcpDefinition;
|
||||
case "NWProtocolOptions":
|
||||
return NWProtocolOptions.CreateTcp ();
|
||||
case "SecCertificate":
|
||||
using (var cdata = NSData.FromArray (mail_google_com))
|
||||
return new SecCertificate (cdata);
|
||||
|
|
Загрузка…
Ссылка в новой задаче