@@ -176,35 +176,50 @@ public interface IMyInterface<T>
176176
177177 """ , typeof ( IEnumerable < > ) ) ;
178178
179- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_object.g.cs" ) . WhoseValue
179+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_object.g.cs" ) ;
180+ await That ( result . Sources [ "Mock.IMyInterface_object.g.cs" ] )
180181 . Contains ( "public global::System.Collections.Generic.IEnumerable<object> MyEnumerable" ) ;
181- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_bool.g.cs" ) . WhoseValue
182+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_bool.g.cs" ) ;
183+ await That ( result . Sources [ "Mock.IMyInterface_bool.g.cs" ] )
182184 . Contains ( "public global::System.Collections.Generic.IEnumerable<bool> MyEnumerable" ) ;
183- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_string.g.cs" ) . WhoseValue
185+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_string.g.cs" ) ;
186+ await That ( result . Sources [ "Mock.IMyInterface_string.g.cs" ] )
184187 . Contains ( "public global::System.Collections.Generic.IEnumerable<string> MyEnumerable" ) ;
185- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_char.g.cs" ) . WhoseValue
188+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_char.g.cs" ) ;
189+ await That ( result . Sources [ "Mock.IMyInterface_char.g.cs" ] )
186190 . Contains ( "public global::System.Collections.Generic.IEnumerable<char> MyEnumerable" ) ;
187- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_byte.g.cs" ) . WhoseValue
191+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_byte.g.cs" ) ;
192+ await That ( result . Sources [ "Mock.IMyInterface_byte.g.cs" ] )
188193 . Contains ( "public global::System.Collections.Generic.IEnumerable<byte> MyEnumerable" ) ;
189- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_sbyte.g.cs" ) . WhoseValue
194+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_sbyte.g.cs" ) ;
195+ await That ( result . Sources [ "Mock.IMyInterface_sbyte.g.cs" ] )
190196 . Contains ( "public global::System.Collections.Generic.IEnumerable<sbyte> MyEnumerable" ) ;
191- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_short.g.cs" ) . WhoseValue
197+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_short.g.cs" ) ;
198+ await That ( result . Sources [ "Mock.IMyInterface_short.g.cs" ] )
192199 . Contains ( "public global::System.Collections.Generic.IEnumerable<short> MyEnumerable" ) ;
193- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_ushort.g.cs" ) . WhoseValue
200+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_ushort.g.cs" ) ;
201+ await That ( result . Sources [ "Mock.IMyInterface_ushort.g.cs" ] )
194202 . Contains ( "public global::System.Collections.Generic.IEnumerable<ushort> MyEnumerable" ) ;
195- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_int.g.cs" ) . WhoseValue
203+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_int.g.cs" ) ;
204+ await That ( result . Sources [ "Mock.IMyInterface_int.g.cs" ] )
196205 . Contains ( "public global::System.Collections.Generic.IEnumerable<int> MyEnumerable" ) ;
197- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_uint.g.cs" ) . WhoseValue
206+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_uint.g.cs" ) ;
207+ await That ( result . Sources [ "Mock.IMyInterface_uint.g.cs" ] )
198208 . Contains ( "public global::System.Collections.Generic.IEnumerable<uint> MyEnumerable" ) ;
199- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_long.g.cs" ) . WhoseValue
209+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_long.g.cs" ) ;
210+ await That ( result . Sources [ "Mock.IMyInterface_long.g.cs" ] )
200211 . Contains ( "public global::System.Collections.Generic.IEnumerable<long> MyEnumerable" ) ;
201- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_ulong.g.cs" ) . WhoseValue
212+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_ulong.g.cs" ) ;
213+ await That ( result . Sources [ "Mock.IMyInterface_ulong.g.cs" ] )
202214 . Contains ( "public global::System.Collections.Generic.IEnumerable<ulong> MyEnumerable" ) ;
203- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_float.g.cs" ) . WhoseValue
215+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_float.g.cs" ) ;
216+ await That ( result . Sources [ "Mock.IMyInterface_float.g.cs" ] )
204217 . Contains ( "public global::System.Collections.Generic.IEnumerable<float> MyEnumerable" ) ;
205- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_double.g.cs" ) . WhoseValue
218+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_double.g.cs" ) ;
219+ await That ( result . Sources [ "Mock.IMyInterface_double.g.cs" ] )
206220 . Contains ( "public global::System.Collections.Generic.IEnumerable<double> MyEnumerable" ) ;
207- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_decimal.g.cs" ) . WhoseValue
221+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface_decimal.g.cs" ) ;
222+ await That ( result . Sources [ "Mock.IMyInterface_decimal.g.cs" ] )
208223 . Contains ( "public global::System.Collections.Generic.IEnumerable<decimal> MyEnumerable" ) ;
209224 }
210225
@@ -229,7 +244,8 @@ public static void Main(string[] args)
229244 }
230245 """ , typeof ( HttpMessageHandler ) ) ;
231246
232- await That ( result . Sources ) . ContainsKey ( "Mock.HttpMessageHandler.g.cs" ) . WhoseValue
247+ await That ( result . Sources ) . ContainsKey ( "Mock.HttpMessageHandler.g.cs" ) ;
248+ await That ( result . Sources [ "Mock.HttpMessageHandler.g.cs" ] )
233249 . Contains ( "protected override void Dispose(bool disposing)" ) . And
234250 . DoesNotContain ( "void Dispose()" ) ;
235251 }
@@ -255,7 +271,8 @@ public static void Main(string[] args)
255271
256272 """ , typeof ( IList < > ) ) ;
257273
258- await That ( result . Sources ) . ContainsKey ( "Mock.IList_int.g.cs" ) . WhoseValue
274+ await That ( result . Sources ) . ContainsKey ( "Mock.IList_int.g.cs" ) ;
275+ await That ( result . Sources [ "Mock.IList_int.g.cs" ] )
259276 . Contains ( "global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()" ) . And
260277 . Contains ( "public global::System.Collections.Generic.IEnumerator<int> GetEnumerator()" ) ;
261278 }
@@ -286,7 +303,8 @@ public record MyRecord(int Id, string Name);
286303
287304 """ , typeof ( IList < > ) ) ;
288305
289- await That ( result . Sources ) . ContainsKey ( "Mock.IList_MyRecord.g.cs" ) . WhoseValue
306+ await That ( result . Sources ) . ContainsKey ( "Mock.IList_MyRecord.g.cs" ) ;
307+ await That ( result . Sources [ "Mock.IList_MyRecord.g.cs" ] )
290308 . Contains ( """
291309 internal class IList_MyRecord :
292310 global::System.Collections.Generic.IList<global::MyOtherCode.MyRecord>
@@ -334,7 +352,8 @@ public interface IMyInterface
334352
335353 """ , typeof ( IEnumerable < > ) ) ;
336354
337- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface.g.cs" ) . WhoseValue
355+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface.g.cs" ) ;
356+ await That ( result . Sources [ "Mock.IMyInterface.g.cs" ] )
338357 . Contains ( "public global::System.Collections.Generic.IEnumerable<object> EnumerableOfObject" ) . And
339358 . Contains ( "public global::System.Collections.Generic.IEnumerable<bool> EnumerableOfBool" ) . And
340359 . Contains ( "public global::System.Collections.Generic.IEnumerable<string> EnumerableOfString" ) . And
@@ -458,8 +477,8 @@ public virtual int SomeMethod()
458477
459478 """ , typeof ( ObsoleteAttribute ) ) ;
460479
461- await That ( result . Sources )
462- . ContainsKey ( "Mock.MyBaseClass.g.cs" ) . WhoseValue
480+ await That ( result . Sources ) . ContainsKey ( "Mock.MyBaseClass.g.cs" ) ;
481+ await That ( result . Sources [ "Mock.MyBaseClass.g.cs" ] )
463482 . Contains ( """
464483 [global::System.Obsolete]
465484 public MyBaseClass(global::Mockolate.MockRegistry mockRegistry)
@@ -520,7 +539,8 @@ public interface IMyInterface2
520539
521540 await That ( result . Diagnostics ) . IsEmpty ( ) ;
522541
523- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface1__IMyInterface2.g.cs" ) . WhoseValue
542+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface1__IMyInterface2.g.cs" ) ;
543+ await That ( result . Sources [ "Mock.IMyInterface1__IMyInterface2.g.cs" ] )
524544 . Contains ( "public void MyMethod(int v1)" ) . And
525545 . Contains ( "void global::MyCode.IMyInterface2.MyMethod(int v1)" ) ;
526546 }
@@ -558,7 +578,8 @@ public interface IMyInterface2
558578
559579 await That ( result . Diagnostics ) . IsEmpty ( ) ;
560580
561- await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface1.g.cs" ) . WhoseValue
581+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface1.g.cs" ) ;
582+ await That ( result . Sources [ "Mock.IMyInterface1.g.cs" ] )
562583 . Contains ( "public void MyMethod(int v1)" ) . And
563584 . Contains ( "void global::MyCode.IMyInterface2.MyMethod(int v1)" ) ;
564585 }
@@ -589,8 +610,8 @@ public class MyService
589610
590611 // A mock subclass declaring a property `MockRegistry` would hide the inherited field
591612 // (CS0108). The dedup pipeline must skip past the conflicting member name.
592- await That ( result . Sources )
593- . ContainsKey ( "Mock.MyService.g.cs" ) . WhoseValue
613+ await That ( result . Sources ) . ContainsKey ( "Mock.MyService.g.cs" ) ;
614+ await That ( result . Sources [ "Mock.MyService.g.cs" ] )
594615 . Contains ( "MockolateMockRegistry" )
595616 . IgnoringNewlineStyle ( ) . And
596617 . DoesNotContain ( "private global::Mockolate.MockRegistry MockRegistry { get; }" )
@@ -621,8 +642,8 @@ public class MockRegistry { }
621642 }
622643 """ ) ;
623644
624- await That ( result . Sources )
625- . ContainsKey ( "Mock.MyService.g.cs" ) . WhoseValue
645+ await That ( result . Sources ) . ContainsKey ( "Mock.MyService.g.cs" ) ;
646+ await That ( result . Sources [ "Mock.MyService.g.cs" ] )
626647 . Contains ( "MockolateMockRegistry" )
627648 . IgnoringNewlineStyle ( ) . And
628649 . DoesNotContain ( "private global::Mockolate.MockRegistry MockRegistry { get; }" )
@@ -654,8 +675,8 @@ public interface IMyInterface
654675
655676 // `Mock` is a method on the type, so the extension `Mock` property would shadow access.
656677 // CreateUniquePropertyName must now skip past it to a Mockolate_-prefixed alternative.
657- await That ( result . Sources )
658- . ContainsKey ( "Mock.IMyInterface.g.cs" ) . WhoseValue
678+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface.g.cs" ) ;
679+ await That ( result . Sources [ "Mock.IMyInterface.g.cs" ] )
659680 . Contains ( "Mockolate_Mock" )
660681 . IgnoringNewlineStyle ( ) ;
661682 }
@@ -684,8 +705,8 @@ public interface IMyInterface
684705 }
685706 """ ) ;
686707
687- await That ( result . Sources )
688- . ContainsKey ( "Mock.IMyInterface.g.cs" ) . WhoseValue
708+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface.g.cs" ) ;
709+ await That ( result . Sources [ "Mock.IMyInterface.g.cs" ] )
689710 . Contains ( "Mockolate_Mock__1" )
690711 . IgnoringNewlineStyle ( ) ;
691712 }
@@ -715,8 +736,8 @@ public interface IMyInterface
715736 }
716737 """ ) ;
717738
718- await That ( result . Sources )
719- . ContainsKey ( "Mock.IMyInterface.g.cs" ) . WhoseValue
739+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface.g.cs" ) ;
740+ await That ( result . Sources [ "Mock.IMyInterface.g.cs" ] )
720741 . Contains ( "Mockolate_Mock__2" )
721742 . IgnoringNewlineStyle ( ) ;
722743 }
@@ -747,8 +768,8 @@ public interface IMyInterface
747768 }
748769 """ , typeof ( EventHandler ) ) ;
749770
750- await That ( result . Sources )
751- . ContainsKey ( "Mock.IMyInterface.g.cs" ) . WhoseValue
771+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyInterface.g.cs" ) ;
772+ await That ( result . Sources [ "Mock.IMyInterface.g.cs" ] )
752773 . Contains ( "MockRegistry_2" )
753774 . IgnoringNewlineStyle ( ) . And
754775 . DoesNotContain ( "private global::Mockolate.MockRegistry MockRegistry_1 { get; }" )
@@ -880,7 +901,8 @@ public CustomAttribute(
880901 """ , typeof ( AllowNullAttribute ) , typeof ( IDataParameter ) , typeof ( LocalizableAttribute ) ,
881902 typeof ( AttributeUsageAttribute ) ) ;
882903
883- await That ( result . Sources ) . ContainsKey ( "Mock.IMyService.g.cs" ) . WhoseValue
904+ await That ( result . Sources ) . ContainsKey ( "Mock.IMyService.g.cs" ) ;
905+ await That ( result . Sources [ "Mock.IMyService.g.cs" ] )
884906 . Contains ( """
885907 /// <inheritdoc cref="global::MyCode.IMyService.SomeProperty" />
886908 [global::System.Diagnostics.CodeAnalysis.AllowNull]
0 commit comments