@@ -130,7 +130,7 @@ public void TestWorksWithBooleanOptions()
130130 local . setTunnel ( tunnelMock . Object ) ;
131131 local . start ( options ) ;
132132 tunnelMock . Verify ( mock => mock . addBinaryPath ( "" ) , Times . Once ) ;
133- tunnelMock . Verify ( mock => mock . addBinaryArguments ( It . IsRegex ( "-vvv.*-force.*-forcelocal*-forceproxy.*-onlyAutomate" ) ) , Times . Once ( ) ) ;
133+ tunnelMock . Verify ( mock => mock . addBinaryArguments ( It . IsRegex ( "-vvv.*-force.*-forcelocal. *-forceproxy.*-onlyAutomate" ) ) , Times . Once ( ) ) ;
134134 tunnelMock . Verify ( mock => mock . Run ( "dummyKey" , "" , logAbsolute ) , Times . Once ( ) ) ;
135135 local . stop ( ) ;
136136 }
@@ -160,6 +160,29 @@ public void TestWorksWithValueOptions()
160160 local . stop ( ) ;
161161 }
162162
163+ [ TestMethod ]
164+ public void TestWorksWithCustomOptions ( )
165+ {
166+ options = new List < KeyValuePair < string , string > > ( ) ;
167+ options . Add ( new KeyValuePair < string , string > ( "key" , "dummyKey" ) ) ;
168+ options . Add ( new KeyValuePair < string , string > ( "customBoolKey1" , "true" ) ) ;
169+ options . Add ( new KeyValuePair < string , string > ( "customBoolKey2" , "false" ) ) ;
170+ options . Add ( new KeyValuePair < string , string > ( "customKey1" , "customValue1" ) ) ;
171+ options . Add ( new KeyValuePair < string , string > ( "customKey2" , "customValue2" ) ) ;
172+
173+ local = new LocalClass ( ) ;
174+ Mock < BrowserStackTunnel > tunnelMock = new Mock < BrowserStackTunnel > ( ) ;
175+ tunnelMock . Setup ( mock => mock . Run ( "dummyKey" , "" , logAbsolute ) ) ;
176+ local . setTunnel ( tunnelMock . Object ) ;
177+ local . start ( options ) ;
178+ tunnelMock . Verify ( mock => mock . addBinaryPath ( "" ) , Times . Once ) ;
179+ tunnelMock . Verify ( mock => mock . addBinaryArguments (
180+ It . IsRegex ( "-customBoolKey1.*customBoolKey2.*-customKey1.*'customValue1'.*-customKey2.*'customValue2'" )
181+ ) , Times . Once ( ) ) ;
182+ tunnelMock . Verify ( mock => mock . Run ( "dummyKey" , "" , logAbsolute ) , Times . Once ( ) ) ;
183+ local . stop ( ) ;
184+ }
185+
163186 [ TestMethod ]
164187 public void TestCallsFallbackOnFailure ( )
165188 {
0 commit comments