@@ -6,7 +6,7 @@ void main() {
6
6
final proxy = SentryProxy (
7
7
host: 'localhost' ,
8
8
port: 8080 ,
9
- type: ProxyType .http,
9
+ type: SentryProxyType .http,
10
10
user: 'admin' ,
11
11
pass: '0000' ,
12
12
);
@@ -21,40 +21,40 @@ void main() {
21
21
22
22
group ('toPacString' , () {
23
23
test ('returns "DIRECT" for ProxyType.direct' , () {
24
- SentryProxy proxy = SentryProxy (type: ProxyType .direct);
24
+ SentryProxy proxy = SentryProxy (type: SentryProxyType .direct);
25
25
expect (proxy.toPacString (), equals ('DIRECT' ));
26
26
});
27
27
28
28
test ('returns "PROXY host:port" for ProxyType.http with host and port' , () {
29
29
SentryProxy proxy =
30
- SentryProxy (type: ProxyType .http, host: 'localhost' , port: 8080 );
30
+ SentryProxy (type: SentryProxyType .http, host: 'localhost' , port: 8080 );
31
31
expect (proxy.toPacString (), equals ('PROXY localhost:8080' ));
32
32
});
33
33
34
34
test ('returns "PROXY host" for ProxyType.http with host only' , () {
35
- SentryProxy proxy = SentryProxy (type: ProxyType .http, host: 'localhost' );
35
+ SentryProxy proxy = SentryProxy (type: SentryProxyType .http, host: 'localhost' );
36
36
expect (proxy.toPacString (), equals ('PROXY localhost' ));
37
37
});
38
38
39
39
test ('returns "SOCKS host:port" for ProxyType.socks with host and port' ,
40
40
() {
41
41
SentryProxy proxy =
42
- SentryProxy (type: ProxyType .socks, host: 'localhost' , port: 8080 );
42
+ SentryProxy (type: SentryProxyType .socks, host: 'localhost' , port: 8080 );
43
43
expect (proxy.toPacString (), equals ('SOCKS localhost:8080' ));
44
44
});
45
45
46
46
test ('returns "SOCKS host" for ProxyType.socks with host only' , () {
47
- SentryProxy proxy = SentryProxy (type: ProxyType .socks, host: 'localhost' );
47
+ SentryProxy proxy = SentryProxy (type: SentryProxyType .socks, host: 'localhost' );
48
48
expect (proxy.toPacString (), equals ('SOCKS localhost' ));
49
49
});
50
50
51
51
test ('falls back to "DIRECT" if http is missing host' , () {
52
- SentryProxy proxy = SentryProxy (type: ProxyType .http);
52
+ SentryProxy proxy = SentryProxy (type: SentryProxyType .http);
53
53
expect (proxy.toPacString (), equals ('DIRECT' ));
54
54
});
55
55
56
56
test ('falls back to "DIRECT" if socks is missing host' , () {
57
- SentryProxy proxy = SentryProxy (type: ProxyType .socks);
57
+ SentryProxy proxy = SentryProxy (type: SentryProxyType .socks);
58
58
expect (proxy.toPacString (), equals ('DIRECT' ));
59
59
});
60
60
});
@@ -85,14 +85,14 @@ void main() {
85
85
final copy = data.copyWith (
86
86
host: 'localhost-2' ,
87
87
port: 9001 ,
88
- type: ProxyType .socks,
88
+ type: SentryProxyType .socks,
89
89
user: 'user' ,
90
90
pass: '1234' ,
91
91
);
92
92
93
93
expect ('localhost-2' , copy.host);
94
94
expect (9001 , copy.port);
95
- expect (ProxyType .socks, copy.type);
95
+ expect (SentryProxyType .socks, copy.type);
96
96
expect ('user' , copy.user);
97
97
expect ('1234' , copy.pass);
98
98
});
0 commit comments