@@ -40,7 +40,7 @@ public async Task ValidAccessReturnsSuccess()
4040 var gitHub = Substitute . For < IGitHub > ( ) ;
4141 gitHub . GetAccess ( ) . Returns ( new [ ] { "repo" , "delete_repo" } ) ;
4242
43- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
43+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
4444
4545 //act
4646 var validation = await sync . ValidateAccess ( ) ;
@@ -56,7 +56,7 @@ public async Task ValidatingNoPrivateAccessFails()
5656 var gitHub = Substitute . For < IGitHub > ( ) ;
5757 gitHub . GetAccess ( ) . Returns ( new [ ] { "public_repo" , "delete_repo" } ) ;
5858
59- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
59+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
6060
6161 //act
6262 var validation = await sync . ValidateAccess ( ) ;
@@ -72,7 +72,7 @@ public async Task ValidatingNoDeleteAccessFails()
7272 var gitHub = Substitute . For < IGitHub > ( ) ;
7373 gitHub . GetAccess ( ) . Returns ( new [ ] { "repo" } ) ;
7474
75- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
75+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
7676
7777 //act
7878 var validation = await sync . ValidateAccess ( ) ;
@@ -89,7 +89,7 @@ public async Task ValidOrgAdminReturnsSuccess()
8989 gitHub . GetCurrentUser ( ) . Returns ( new Stubs . User ( "SteveDesmond-ca" ) ) ;
9090 gitHub . GetRole ( "SteveDesmond-ca" , "ecoAPM" ) . Returns ( MembershipRole . Admin ) ;
9191
92- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
92+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
9393
9494 //act
9595 var validation = await sync . ValidateUser ( new Stubs . Organization ( "ecoAPM" ) ) ;
@@ -106,7 +106,7 @@ public async Task NonOrgAdminFails()
106106 gitHub . GetCurrentUser ( ) . Returns ( new Stubs . User ( "SteveDesmond-ca" ) ) ;
107107 gitHub . GetRole ( "SteveDesmond-ca" , "ecoAPM" ) . Returns ( MembershipRole . Member ) ;
108108
109- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
109+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
110110
111111 //act
112112 var validation = await sync . ValidateUser ( new Stubs . Organization ( "ecoAPM" ) ) ;
@@ -123,7 +123,7 @@ public async Task NonOrgMemberFails()
123123 gitHub . GetCurrentUser ( ) . Returns ( new Stubs . User ( "SteveDesmond-ca" ) ) ;
124124 gitHub . GetRole ( "SteveDesmond-ca" , "ecoAPM" ) . Returns ( ( MembershipRole ? ) null ) ;
125125
126- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
126+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
127127
128128 //act
129129 var validation = await sync . ValidateUser ( new Stubs . Organization ( "ecoAPM" ) ) ;
@@ -140,7 +140,7 @@ public async Task SameUserAsTargetReturnsSuccess()
140140 gitHub . GetCurrentUser ( ) . Returns ( new Stubs . User ( "SteveDesmond-ca" ) ) ;
141141 gitHub . GetRole ( "SteveDesmond-ca" , "ecoAPM" ) . Returns ( MembershipRole . Admin ) ;
142142
143- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
143+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
144144
145145 //act
146146 var validation = await sync . ValidateUser ( new Stubs . Organization ( "ecoAPM" ) ) ;
@@ -157,7 +157,7 @@ public async Task DifferentTargetUserFails()
157157 gitHub . GetCurrentUser ( ) . Returns ( new Stubs . User ( "SteveDesmond-ca" ) ) ;
158158 gitHub . GetRole ( "SteveDesmond-ca" , "ecoAPM" ) . Returns ( MembershipRole . Member ) ;
159159
160- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
160+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
161161
162162 //act
163163 var validation = await sync . ValidateUser ( new Stubs . User ( "Unit-Test" ) ) ;
@@ -173,7 +173,7 @@ public async Task GetsOrganizationByDefault()
173173 var gitHub = Substitute . For < IGitHub > ( ) ;
174174 gitHub . GetOrganization ( "ecoAPM" ) . Returns ( new Organization ( ) ) ;
175175 gitHub . GetUser ( "ecoAPM" ) . Throws < Exception > ( ) ;
176- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
176+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
177177
178178 //act
179179 var account = await sync . GetAccount ( "ecoAPM" ) ;
@@ -189,7 +189,7 @@ public async Task GetsUserIfOrganizationDoesNotExist()
189189 var gitHub = Substitute . For < IGitHub > ( ) ;
190190 gitHub . GetOrganization ( "SteveDesmond-ca" ) . Throws < Exception > ( ) ;
191191 gitHub . GetUser ( "SteveDesmond-ca" ) . Returns ( new User ( ) ) ;
192- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
192+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
193193
194194 //act
195195 var account = await sync . GetAccount ( "SteveDesmond-ca" ) ;
@@ -203,7 +203,7 @@ public async Task GetsRepositoriesForOrganizationBasedOnAccountType()
203203 {
204204 //arrange
205205 var gitHub = Substitute . For < IGitHub > ( ) ;
206- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
206+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
207207
208208 var account = new Stubs . Organization ( "ecoAPM" ) ;
209209
@@ -219,7 +219,7 @@ public async Task GetsRepositoriesForUserBasedOnAccountType()
219219 {
220220 //arrange
221221 var gitHub = Substitute . For < IGitHub > ( ) ;
222- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
222+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
223223
224224 var account = new Stubs . User ( "SteveDesmond-ca" ) ;
225225
@@ -236,7 +236,7 @@ public async Task GettingAccountLabelsCreatesTempRepoForOrganization()
236236 //arrange
237237 var tempRepoName = "" ;
238238 var gitHub = Substitute . For < IGitHub > ( ) ;
239- var sync = new Synchronizer ( gitHub , new Random ( ) , _noOp , _noOp ) ;
239+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
240240
241241 var account = new Stubs . Organization ( "ecoAPM" ) ;
242242 await gitHub . CreateTempRepoForOrganization ( account , Arg . Do < string > ( name => tempRepoName = name ) ) ;
@@ -245,7 +245,7 @@ public async Task GettingAccountLabelsCreatesTempRepoForOrganization()
245245 await sync . GetAccountLabels ( account ) ;
246246
247247 //assert
248- Assert . StartsWith ( "temp-label-sync-" , tempRepoName ) ;
248+ Assert . StartsWith ( "temp-label-sync-20 " , tempRepoName ) ;
249249 }
250250
251251 [ Fact ]
@@ -254,7 +254,7 @@ public async Task GettingAccountLabelsCreatesTempRepoForUser()
254254 //arrange
255255 var tempRepoName = "" ;
256256 var gitHub = Substitute . For < IGitHub > ( ) ;
257- var sync = new Synchronizer ( gitHub , new Random ( ) , _noOp , _noOp ) ;
257+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
258258
259259 var account = new Stubs . User ( "SteveDesmond-ca" ) ;
260260 await gitHub . CreateTempRepoForUser ( account , Arg . Do < string > ( name => tempRepoName = name ) ) ;
@@ -263,7 +263,7 @@ public async Task GettingAccountLabelsCreatesTempRepoForUser()
263263 await sync . GetAccountLabels ( account ) ;
264264
265265 //assert
266- Assert . StartsWith ( "temp-label-sync-" , tempRepoName ) ;
266+ Assert . StartsWith ( "temp-label-sync-20 " , tempRepoName ) ;
267267 }
268268
269269 [ Fact ]
@@ -272,7 +272,7 @@ public async Task GettingAccountLabelsDeletesTempRepoForOrganization()
272272 //arrange
273273 var tempRepoName = "" ;
274274 var gitHub = Substitute . For < IGitHub > ( ) ;
275- var sync = new Synchronizer ( gitHub , new Random ( ) , _noOp , _noOp ) ;
275+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
276276
277277 var account = new Stubs . Organization ( "ecoAPM" ) ;
278278 await gitHub . DeleteTempRepo ( account , Arg . Do < string > ( name => tempRepoName = name ) ) ;
@@ -281,7 +281,7 @@ public async Task GettingAccountLabelsDeletesTempRepoForOrganization()
281281 await sync . GetAccountLabels ( account ) ;
282282
283283 //assert
284- Assert . StartsWith ( "temp-label-sync-" , tempRepoName ) ;
284+ Assert . StartsWith ( "temp-label-sync-20 " , tempRepoName ) ;
285285 }
286286
287287 [ Fact ]
@@ -290,7 +290,7 @@ public async Task GettingAccountLabelsDeletesTempRepoForUser()
290290 //arrange
291291 var tempRepoName = "" ;
292292 var gitHub = Substitute . For < IGitHub > ( ) ;
293- var sync = new Synchronizer ( gitHub , new Random ( ) , _noOp , _noOp ) ;
293+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
294294
295295 var account = new Stubs . User ( "SteveDesmond-ca" ) ;
296296 await gitHub . DeleteTempRepo ( account , Arg . Do < string > ( name => tempRepoName = name ) ) ;
@@ -299,7 +299,7 @@ public async Task GettingAccountLabelsDeletesTempRepoForUser()
299299 await sync . GetAccountLabels ( account ) ;
300300
301301 //assert
302- Assert . StartsWith ( "temp-label-sync-" , tempRepoName ) ;
302+ Assert . StartsWith ( "temp-label-sync-20 " , tempRepoName ) ;
303303 }
304304
305305 [ Fact ]
@@ -308,7 +308,7 @@ public async Task PerformsCorrectActions()
308308 //arrange
309309 var gitHub = Substitute . For < IGitHub > ( ) ;
310310 gitHub . GetLabels ( Arg . Any < Repository > ( ) ) . Returns ( _repoLabels ) ;
311- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
311+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
312312
313313 //act
314314 await sync . SyncRepo ( new Repository ( ) , new Settings ( ) , _accountLabels ) ;
@@ -325,7 +325,7 @@ public async Task NoAddDoesNotAdd()
325325 //arrange
326326 var gitHub = Substitute . For < IGitHub > ( ) ;
327327 gitHub . GetLabels ( Arg . Any < Repository > ( ) ) . Returns ( _repoLabels ) ;
328- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
328+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
329329
330330 var settings = new Settings { NoAdd = true } ;
331331
@@ -344,7 +344,7 @@ public async Task NoEditDoesNotEdit()
344344 //arrange
345345 var gitHub = Substitute . For < IGitHub > ( ) ;
346346 gitHub . GetLabels ( Arg . Any < Repository > ( ) ) . Returns ( _repoLabels ) ;
347- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
347+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
348348
349349 var settings = new Settings { NoEdit = true } ;
350350
@@ -363,7 +363,7 @@ public async Task NoDeleteDoesNotDelete()
363363 //arrange
364364 var gitHub = Substitute . For < IGitHub > ( ) ;
365365 gitHub . GetLabels ( Arg . Any < Repository > ( ) ) . Returns ( _repoLabels ) ;
366- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
366+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
367367
368368 var settings = new Settings { NoDelete = true } ;
369369
@@ -382,7 +382,7 @@ public async Task DryRunPerformsNoActions()
382382 //arrange
383383 var gitHub = Substitute . For < IGitHub > ( ) ;
384384 gitHub . GetLabels ( Arg . Any < Repository > ( ) ) . Returns ( _repoLabels ) ;
385- var sync = new Synchronizer ( gitHub , null , _noOp , _noOp ) ;
385+ var sync = new Synchronizer ( gitHub , _noOp , _noOp ) ;
386386
387387 var settings = new Settings { DryRun = true } ;
388388
0 commit comments