Skip to content

Commit cf8fa35

Browse files
cataggarCopilot
andauthored
promote UvLockComponentDetector to IExperimentalDetector (#1469)
* Initial plan * Promote UvLockDetector to experimental Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com> * add unit test --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 7ab0862 commit cf8fa35

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.ComponentDetection.Detectors.Uv
1212
using Microsoft.ComponentDetection.Contracts.TypedComponent;
1313
using Microsoft.Extensions.Logging;
1414

15-
public class UvLockComponentDetector : FileComponentDetector, IDefaultOffComponentDetector
15+
public class UvLockComponentDetector : FileComponentDetector, IExperimentalDetector
1616
{
1717
public UvLockComponentDetector(
1818
IComponentStreamEnumerableFactory componentStreamEnumerableFactory,

test/Microsoft.ComponentDetection.Detectors.Tests/ComponentDetectorTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,13 @@ public void AllDetectorsHaveUniqueSupportedComponentTypes()
6262
detector.SupportedComponentTypes.Should().OnlyHaveUniqueItems($"because {detector.Id} should have unique supported component types");
6363
}
6464
}
65+
66+
[TestMethod]
67+
public void UvLockComponentDetector_ImplementsIExperimentalDetector()
68+
{
69+
var uvLockDetector = this.detectors.SingleOrDefault(d => d.Id == "UvLock");
70+
71+
uvLockDetector.Should().NotBeNull("because UvLockComponentDetector should be registered");
72+
uvLockDetector.Should().BeAssignableTo<IExperimentalDetector>("because UvLockComponentDetector should implement IExperimentalDetector");
73+
}
6574
}

0 commit comments

Comments
 (0)