File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import "package:dart_wot/src/binding_coap/coap_extensions.dart";
1111import "package:test/test.dart" ;
1212
1313void main () {
14- group ("CoAP definitions" , () {
15- test ("should deserialize CoAP Forms" , () async {
14+ group ("CoAP definitions should " , () {
15+ test ("deserialize CoAP Forms" , () async {
1616 const thingDescriptionJson = {
1717 "@context" : [
1818 "https://www.w3.org/2022/wot/td/v1.1" ,
@@ -88,4 +88,12 @@ void main() {
8888 );
8989 });
9090 });
91+
92+ test ("parse CoAP subprotocols" , () async {
93+ final observeSubprotocol = CoapSubprotocol .tryParse ("cov:observe" );
94+ expect (observeSubprotocol == CoapSubprotocol .observe, isTrue);
95+
96+ final unknownSubprotocol = CoapSubprotocol .tryParse ("foobar" );
97+ expect (unknownSubprotocol, isNull);
98+ });
9199}
You can’t perform that action at this time.
0 commit comments