Fix audit findings for coverage, architecture checks, and XML docs
This commit is contained in:
@@ -4,6 +4,9 @@ namespace ZB.MOM.WW.CBDD.Tests;
|
||||
|
||||
public class VectorMathTests
|
||||
{
|
||||
/// <summary>
|
||||
/// Verifies distance calculations across all supported vector metrics.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Distance_Should_Cover_All_Metrics()
|
||||
{
|
||||
@@ -21,6 +24,9 @@ public class VectorMathTests
|
||||
MathF.Abs(cosineDistance - expectedCosine).ShouldBeLessThan(0.0001f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies cosine similarity returns zero when one vector has zero magnitude.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void CosineSimilarity_Should_Return_Zero_For_ZeroMagnitude_Vector()
|
||||
{
|
||||
@@ -30,6 +36,9 @@ public class VectorMathTests
|
||||
VectorMath.CosineSimilarity(v1, v2).ShouldBe(0f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies dot product throws for mismatched vector lengths.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void DotProduct_Should_Throw_For_Length_Mismatch()
|
||||
{
|
||||
@@ -39,6 +48,9 @@ public class VectorMathTests
|
||||
Should.Throw<ArgumentException>(() => VectorMath.DotProduct(v1, v2));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies squared Euclidean distance throws for mismatched vector lengths.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void EuclideanDistanceSquared_Should_Throw_For_Length_Mismatch()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user