File tree Expand file tree Collapse file tree 6 files changed +35
-29
lines changed Expand file tree Collapse file tree 6 files changed +35
-29
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,7 @@ public class BatchTests
1616 [ SetUp ]
1717 public void Setup ( )
1818 {
19- _client = new Stream . StreamClient (
20- "98a6bhskrrwj" ,
21- "t3nj7j8m6dtdbbakzbu9p7akjk5da8an5wxwyt6g73nt5hf9yujp8h4jw244r67p" ,
22- new Stream . StreamClientOptions ( )
23- {
24- Location = Stream . StreamApiLocation . USEast
25- } ) ;
19+ _client = Credentials . Instance . Client ;
2620 }
2721
2822 [ Test ]
Original file line number Diff line number Diff line change @@ -17,13 +17,7 @@ public class ClientTests
1717 [ SetUp ]
1818 public void Setup ( )
1919 {
20- _client = new Stream . StreamClient (
21- "98a6bhskrrwj" ,
22- "t3nj7j8m6dtdbbakzbu9p7akjk5da8an5wxwyt6g73nt5hf9yujp8h4jw244r67p" ,
23- new Stream . StreamClientOptions ( )
24- {
25- Location = Stream . StreamApiLocation . USEast
26- } ) ;
20+ _client = Credentials . Instance . Client ;
2721 }
2822
2923 [ Test ]
Original file line number Diff line number Diff line change @@ -17,13 +17,7 @@ public class FeedTests
1717 [ SetUp ]
1818 public void Setup ( )
1919 {
20- _client = new Stream . StreamClient (
21- "98a6bhskrrwj" ,
22- "t3nj7j8m6dtdbbakzbu9p7akjk5da8an5wxwyt6g73nt5hf9yujp8h4jw244r67p" ,
23- new Stream . StreamClientOptions ( )
24- {
25- Location = Stream . StreamApiLocation . USEast
26- } ) ;
20+ _client = Credentials . Instance . Client ;
2721 _feed = _client . Feed ( "flat" , "42" ) ;
2822 }
2923
Original file line number Diff line number Diff line change @@ -23,14 +23,7 @@ public class IntegrationTests
2323 [ SetUp ]
2424 public void Setup ( )
2525 {
26- _client = new Stream . StreamClient (
27- "ea7xzzkj6kc4" ,
28- "zd8cdv9rhxcpmkx9zx4jqt7q9qhawpgsfpay2gy7jaubym32crs9kaux2pm67wrx" ,
29- new Stream . StreamClientOptions ( )
30- {
31- Location = Stream . StreamApiLocation . USEast ,
32- Timeout = 10000
33- } ) ;
26+ _client = Credentials . Instance . Client ;
3427 _user1 = _client . Feed ( "user" , System . Guid . NewGuid ( ) . ToString ( ) ) ;
3528 _user2 = _client . Feed ( "user" , System . Guid . NewGuid ( ) . ToString ( ) ) ;
3629 _flat3 = _client . Feed ( "flat" , System . Guid . NewGuid ( ) . ToString ( ) ) ;
Original file line number Diff line number Diff line change 1+ using System ;
2+
3+ namespace stream_net_tests
4+ {
5+ public class Credentials
6+ {
7+ public static Credentials Instance = new Credentials ( ) ;
8+
9+ public Stream . StreamClient Client
10+ {
11+ get
12+ {
13+ return _client ;
14+ }
15+ }
16+
17+ private readonly Stream . StreamClient _client ;
18+
19+ internal Credentials ( )
20+ {
21+ _client = new Stream . StreamClient (
22+ Environment . GetEnvironmentVariable ( "STREAM_API_KEY" ) ,
23+ Environment . GetEnvironmentVariable ( "STREAM_API_SECRET" ) ,
24+ new Stream . StreamClientOptions ( )
25+ {
26+ Location = Stream . StreamApiLocation . USEast ,
27+ Timeout = 10000
28+ } ) ;
29+ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments