@@ -65,6 +65,16 @@ public void FormAdbRequestTest()
6565 Assert . Equal ( "000Chost:version"u8 , AdbClient . FormAdbRequest ( "host:version" ) ) ;
6666 }
6767
68+ /// <summary>
69+ /// Tests the <see cref="AdbClient.FormAdbRequest(ReadOnlySpan{char})"/> method.
70+ /// </summary>
71+ [ Fact ]
72+ public void FormAdbRequestSpanTest ( )
73+ {
74+ Assert . Equal ( "0009host:kill"u8 , AdbClient . FormAdbRequest ( "host:kill" . AsSpan ( ) ) ) ;
75+ Assert . Equal ( "000Chost:version"u8 , AdbClient . FormAdbRequest ( "host:version" . AsSpan ( ) ) ) ;
76+ }
77+
6878 /// <summary>
6979 /// Tests the <see cref="AdbClient.CreateAdbForwardRequest(string, int)"/> method.
7080 /// </summary>
@@ -75,6 +85,16 @@ public void CreateAdbForwardRequestTest()
7585 Assert . Equal ( "0012tcp:1981:127.0.0.1"u8 , AdbClient . CreateAdbForwardRequest ( "127.0.0.1" , 1981 ) ) ;
7686 }
7787
88+ /// <summary>
89+ /// Tests the <see cref="AdbClient.CreateAdbForwardRequest(ReadOnlySpan{char}, int)"/> method.
90+ /// </summary>
91+ [ Fact ]
92+ public void CreateAdbForwardRequestSpanTest ( )
93+ {
94+ Assert . Equal ( "0008tcp:1984"u8 , AdbClient . CreateAdbForwardRequest ( [ ] , 1984 ) ) ;
95+ Assert . Equal ( "0012tcp:1981:127.0.0.1"u8 , AdbClient . CreateAdbForwardRequest ( "127.0.0.1" . AsSpan ( ) , 1981 ) ) ;
96+ }
97+
7898 /// <summary>
7999 /// Tests the <see cref="AdbClient.GetAdbVersion"/> method.
80100 /// </summary>
@@ -1139,7 +1159,7 @@ public void GetFeatureSetTest()
11391159 public void CloneTest ( )
11401160 {
11411161 Assert . True ( TestClient is ICloneable < IAdbClient > ) ;
1142- #if WINDOWS10_0_18362_0_OR_GREATER
1162+ #if WINDOWS10_0_17763_0_OR_GREATER
11431163 Assert . True ( TestClient is ICloneable < IAdbClient . IWinRT > ) ;
11441164#endif
11451165 AdbClient client = TestClient . Clone ( ) ;
@@ -1149,6 +1169,16 @@ public void CloneTest()
11491169 Assert . Equal ( endPoint , client . EndPoint ) ;
11501170 }
11511171
1172+ /// <summary>
1173+ /// Tests the <see cref="AdbClient.ToString()"/> method.
1174+ /// </summary>
1175+ [ Fact ]
1176+ public void ToStringTest ( )
1177+ {
1178+ AdbClient adbClient = new ( ) ;
1179+ Assert . Equal ( $ "The { typeof ( AdbClient ) } communicate with adb server at '127.0.0.1:5037'.", adbClient . ToString ( ) ) ;
1180+ }
1181+
11521182 private void RunConnectTest ( Action test , string connectString )
11531183 {
11541184 string [ ] requests = [ $ "host:connect:{ connectString } "] ;
0 commit comments