@@ -226,183 +226,5 @@ private string GetModuleContent(IVBE vbe, string componentName = "")
226
226
? project . VBComponents [ componentName ] . CodeModule : project . VBComponents [ 0 ] . CodeModule ;
227
227
return module . Content ( ) ;
228
228
}
229
- /*//<<<<<<< HEAD
230
- //=======
231
-
232
- internal class TestComponentSpecification
233
- {
234
- private string _name;
235
- private string _content;
236
- private ComponentType _componentType;
237
- public TestComponentSpecification(string componentName, string componentContent, ComponentType componentType)
238
- {
239
- _name = componentName;
240
- _content = componentContent;
241
- _componentType = componentType;
242
- }
243
-
244
- public string Name { get { return _name; } }
245
- public string Content { get { return _content; } }
246
- public ComponentType ModuleType { get { return _componentType; } }
247
- }
248
-
249
- private string GetQuickFixResult(string userEnteredNames, TestComponentSpecification resultsComponent, TestComponentSpecification[] testComponents)
250
- {
251
- var vbe = BuildProject("TestProject", testComponents.ToList());
252
- var state = MockParser.CreateAndParse(vbe.Object);
253
-
254
- var mockDialogFactory = BuildMockDialogFactory(userEnteredNames);
255
- var inspection = new AssignedByValParameterInspection(state, mockDialogFactory.Object);
256
- var inspectionResults = inspection.GetInspectionResults();
257
-
258
- inspectionResults.First().QuickFixes.Single(s => s is AssignedByValParameterMakeLocalCopyQuickFix).Fix();
259
-
260
- return GetModuleContent(vbe.Object, resultsComponent.Name);
261
- }
262
-
263
- private Mock<IVBE> BuildProject(string projectName, List<TestComponentSpecification> testComponents)
264
- {
265
- var builder = new MockVbeBuilder();
266
- var enclosingProjectBuilder = builder.ProjectBuilder(projectName, ProjectProtection.Unprotected);
267
-
268
- testComponents.ForEach(c => enclosingProjectBuilder.AddComponent(c.Name, c.ModuleType, c.Content));
269
- var enclosingProject = enclosingProjectBuilder.Build();
270
- builder.AddProject(enclosingProject);
271
- return builder.Build();
272
- }
273
-
274
- private string GetNameAlreadyAccessibleWithinClass_FirstClassBody()
275
- {
276
- return
277
- @"
278
- Private memberString As String
279
- Private memberLong As Long
280
-
281
- Private Sub Class_Initialize()
282
- memberLong = 6
283
- memberString = ""No Value""
284
- End Sub
285
-
286
- Public Sub Foo(ByVal arg1 As String, theSecondArg As Long)
287
- Let arg1 = ""test""
288
- End Sub
289
-
290
- Private Sub FooFight(ByRef arg1 As String)
291
- xArg1 = 6
292
- Let arg1 = ""test""
293
- End Sub
294
- ";
295
-
296
- }
297
- private string GetRespectsDeclarationsAccessibilityRules_FirstClassBody()
298
- {
299
- return
300
- @"
301
- Private memberString As String
302
- Private memberLong As Long
303
- Private myEggo as String
304
-
305
- Public Sub Foo(ByVal arg1 As String)
306
- Dim localVar as Long
307
- localVar = 7
308
- Let arg1 = ""test""
309
- memberString = arg1 & ""Foo""
310
- End Sub
311
-
312
- Public Function KungFooFighting(ByRef arg1 As String, theSecondArg As Long) As String
313
- Let arg1 = ""test""
314
- Dim result As String
315
- result = arg1 & theSecondArg
316
- KungFooFighting = result
317
- End Function
318
-
319
- Property Let GoMyEggo(newValue As String)
320
- myEggo = newValue
321
- End Property
322
-
323
- Property Get GoMyEggo()
324
- GoMyEggo = myEggo
325
- End Property
326
-
327
- Private Sub FooFight(ByRef arg1 As String)
328
- xArg1 = 6
329
- Let arg1 = ""test""
330
- End Sub
331
- ";
332
- }
333
- private string GetRespectsDeclarationsAccessibilityRules_SecondClassBody()
334
- {
335
- return
336
- @"
337
- Private memberString As String
338
- Private memberLong As Long
339
- Public mySecondEggo as String
340
-
341
-
342
- Public Sub Foo2( arg1 As String, theSecondArg As Long)
343
- Let arg1 = ""test""
344
- memberString = arg1 & ""Foo""
345
- End Sub
346
-
347
- Public Function KungFooFighting(ByRef arg1 As String, theSecondArg As Long) As String
348
- Let arg1 = ""test""
349
- Dim result As String
350
- result = arg1 & theSecondArg
351
- KungFooFighting = result
352
- End Function
353
-
354
- Property Let GoMyOtherEggo(newValue As String)
355
- mySecondEggo = newValue
356
- End Property
357
-
358
- Property Get GoMyOtherEggo()
359
- GoMyOtherEggo = mySecondEggo
360
- End Property
361
-
362
- Private Sub FooFighters(ByRef arg1 As String)
363
- xArg1 = 6
364
- Let arg1 = ""test""
365
- End Sub
366
-
367
- Sub Bar()
368
- Dim st As String
369
- st = ""Test""
370
- Dim v As Long
371
- v = 5
372
- result = KungFooFighting(st, v)
373
- End Sub
374
- ";
375
- }
376
- private string GetRespectsDeclarationsAccessibilityRules_FirstModuleBody()
377
- {
378
- return
379
- @"
380
- Option Explicit
381
-
382
-
383
- Public Const CantTouchThis As String = ""Can't Touch this""
384
- Public THE_FILENAME As String
385
-
386
- Sub SetFilename(filename As String)
387
- THE_FILENAME = filename
388
- End Sub
389
- ";
390
- }
391
- private string GetRespectsDeclarationsAccessibilityRules_SecondModuleBody()
392
- {
393
- return
394
- @"
395
- Option Explicit
396
-
397
-
398
- Public BigNumber as Long
399
- Public ShortStory As String
400
-
401
- Public Sub DoSomething(filename As String)
402
- ShortStory = filename
403
- End Sub
404
- ";
405
- }
406
- //>>>>>>> rubberduck-vba/next*/
407
229
}
408
230
}
0 commit comments