1
1
/*
2
2
Copyright 2011 Selenium committers
3
- Copyright 2011 Software Freedom Conservancy
3
+ Copyright 2011-2015 Software Freedom Conservancy
4
4
5
5
Licensed under the Apache License, Version 2.0 (the "License");
6
6
you may not use this file except in compliance with the License.
33
33
import java .util .HashMap ;
34
34
import java .util .Map ;
35
35
36
-
37
36
public class RemoteProxyInheritanceTest {
38
-
39
37
private Registry registry = Registry .newInstance ();
40
38
41
39
@ Test
42
40
public void defaultToRemoteProxy () {
43
-
44
-
45
41
RegistrationRequest req = RegistrationRequest .localWebdriverNoCapabilities ();
46
42
47
43
Map <String , Object > app1 = new HashMap <String , Object >();
48
44
Map <String , Object > config = new HashMap <String , Object >();
49
45
app1 .put (APP , "app1" );
50
46
config .put (ID , "abc" );
51
47
52
-
53
48
req .addDesiredCapability (app1 );
54
49
req .setConfiguration (config );
55
50
@@ -58,7 +53,6 @@ public void defaultToRemoteProxy() {
58
53
assertEquals (BaseRemoteProxy .class , p .getClass ());
59
54
}
60
55
61
-
62
56
@ Test
63
57
public void existing () {
64
58
Map <String , Object > app1 = new HashMap <String , Object >();
@@ -82,7 +76,6 @@ public void existing() {
82
76
assertEquals ("B" , myRemoteProxy .getCustom2 ());
83
77
assertEquals ("A" , myRemoteProxy .getConfig ().get ("Custom1" ));
84
78
assertEquals ("B" , myRemoteProxy .getConfig ().get ("Custom2" ));
85
-
86
79
}
87
80
88
81
@ Test (expected = InvalidParameterException .class )
@@ -106,7 +99,6 @@ public void notExtendingProxyExisting() {
106
99
app1 .put (APP , "app1" );
107
100
config .put (PROXY_CLASS , "java.lang.String" );
108
101
109
-
110
102
RegistrationRequest req = new RegistrationRequest ();
111
103
req .addDesiredCapability (app1 );
112
104
req .setConfiguration (config );
@@ -130,10 +122,8 @@ public void badConfig() {
130
122
BaseRemoteProxy .getNewInstance (req , registry );
131
123
}
132
124
133
-
134
125
@ After
135
- public void tearDown (){
126
+ public void tearDown () {
136
127
registry .stop ();
137
128
}
138
-
139
129
}
0 commit comments