@@ -46,14 +46,16 @@ public static IEnumerable<object[]> SchemaData()
4646 return new [ ]
4747 {
4848 new object [ ] { Scheme . Amqp } ,
49- new object [ ] { Scheme . Amqps }
49+ new object [ ] { Scheme . Amqps } ,
50+ new object [ ] { Scheme . Ws } ,
51+ new object [ ] { Scheme . Wss } ,
5052 } ;
5153 }
5254
5355 [ Fact ]
5456 public void Throws_when_invalid_scheme_specified ( )
5557 {
56- var exception = Assert . Throws < CreateEndpointException > ( ( ) => Endpoint . Create ( "localhost" , 5672 , "guest" , "guest" , ( Scheme ) 999 ) ) ;
58+ var exception = Assert . Throws < CreateEndpointException > ( ( ) => Endpoint . Create ( "localhost" , 5672 , "guest" , "guest" , scheme : ( Scheme ) 999 ) ) ;
5759 Assert . Equal ( ErrorCode . InvalidField , exception . ErrorCode ) ;
5860 }
5961
@@ -67,10 +69,11 @@ public static IEnumerable<object[]> EndpointData()
6769 {
6870 return new [ ]
6971 {
70- new object [ ] { Endpoint . Create ( "localhost" , 5762 ) , "amqp://localhost:5762" } ,
71- new object [ ] { Endpoint . Create ( "localhost" , 5762 , scheme : Scheme . Amqps ) , "amqps://localhost:5762" } ,
72- new object [ ] { Endpoint . Create ( "localhost" , 5762 , "admin" , password : "secret" ) , "amqp://localhost:5762" } ,
73- new object [ ] { Endpoint . Create ( "localhost" , 5762 , "admin" , password : "secret" , Scheme . Amqps ) , "amqps://localhost:5762" }
72+ new object [ ] { Endpoint . Create ( "localhost" , 5762 ) , "amqp://localhost:5762/" } ,
73+ new object [ ] { Endpoint . Create ( "localhost" , 5762 , scheme : Scheme . Amqps ) , "amqps://localhost:5762/" } ,
74+ new object [ ] { Endpoint . Create ( "localhost" , 5762 , "admin" , password : "secret" ) , "amqp://localhost:5762/" } ,
75+ new object [ ] { Endpoint . Create ( "localhost" , 5762 , "admin" , password : "secret" , scheme : Scheme . Amqps ) , "amqps://localhost:5762/" } ,
76+ new object [ ] { Endpoint . Create ( "localhost" , 80 , "admin" , password : "secret" , scheme : Scheme . Wss , path : "/redirectMeToBrokerA" ) , "wss://localhost:80/redirectMeToBrokerA" } ,
7477 } ;
7578 }
7679 }
0 commit comments