File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
test/Microsoft.ComponentDetection.Detectors.Tests Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,15 @@ public async Task ParseWithOwnershipAsync_PartialOwnership_MixesFallbackAndOwner
492492 var parentRecorder = new Mock < IComponentRecorder > ( MockBehavior . Strict ) ;
493493 var owner1 = new Mock < ISingleFileComponentRecorder > ( MockBehavior . Loose ) ;
494494
495+ // Set up DependencyGraph for the recorders
496+ var sbomGraph = new Mock < IDependencyGraph > ( ) ;
497+ sbomGraph . Setup ( g => g . Contains ( It . IsAny < string > ( ) ) ) . Returns ( false ) ;
498+ sbomRecorder . Setup ( r => r . DependencyGraph ) . Returns ( sbomGraph . Object ) ;
499+
500+ var owner1Graph = new Mock < IDependencyGraph > ( ) ;
501+ owner1Graph . Setup ( g => g . Contains ( It . IsAny < string > ( ) ) ) . Returns ( false ) ;
502+ owner1 . Setup ( r => r . DependencyGraph ) . Returns ( owner1Graph . Object ) ;
503+
495504 parentRecorder . Setup ( p => p . CreateSingleFileComponentRecorder ( "manifests/owner1" ) ) . Returns ( owner1 . Object ) ;
496505
497506 var ownershipMap = new Dictionary < string , HashSet < string > >
You can’t perform that action at this time.
0 commit comments