File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ TypeReference typeReference
347347 )
348348 {
349349 var assemblyQualifiedName = System . Reflection . Assembly . CreateQualifiedName (
350- typeReference . Module . Assembly . FullName ,
350+ typeReference . Scope . Name ,
351351 typeReference . BuildFullName ( )
352352 ) ;
353353 if ( _allTypes . TryGetValue ( assemblyQualifiedName , out var existingTypeInstance ) )
@@ -361,8 +361,8 @@ TypeReference typeReference
361361 typeReference . BuildFullName ( ) ,
362362 typeReference . Name ,
363363 _assemblyRegistry . GetOrCreateAssembly (
364- typeReference . Module . Assembly . Name . Name ,
365- typeReference . Module . Assembly . FullName ,
364+ typeReference . Scope . Name ,
365+ typeReference . Scope . ToString ( ) ,
366366 true ,
367367 null
368368 ) ,
Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ public void TypesAreAssignedToCorrectAssemblies()
131131 public void UnavailableTypeTest ( )
132132 {
133133 // When loading an assembly from a file, there are situations where the assemblies dependencies are not
134- // available in the current AppDomain. This test checks that the loader does not throw an exception in this
135- // case .
134+ // available in the current AppDomain. This test checks that the loader does not throw an exception
135+ // and that the unavailable types contain the correct assembly they come from .
136136 var currentAssemblyPath = AppDomain . CurrentDomain . BaseDirectory [
137137 ..AppDomain . CurrentDomain . BaseDirectory . IndexOf (
138138 @"ArchUnitNETTests" ,
@@ -153,6 +153,7 @@ public void UnavailableTypeTest()
153153 var loggerType = architecture . ReferencedTypes . WhereFullNameIs ( "Serilog.ILogger" ) ;
154154 Assert . NotNull ( loggerType ) ;
155155 Assert . True ( loggerType is UnavailableType ) ;
156+ Assert . Equal ( "Serilog" , loggerType . Assembly . Name ) ;
156157 }
157158 }
158159}
You can’t perform that action at this time.
0 commit comments