Fix audit findings for coverage, architecture checks, and XML docs
This commit is contained in:
@@ -11,12 +11,30 @@ public class BsonSchemaTests
|
||||
{
|
||||
public class SimpleEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
public ObjectId Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the age.
|
||||
/// </summary>
|
||||
public int Age { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the entity is active.
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies schema generation for a simple entity.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void GenerateSchema_SimpleEntity()
|
||||
{
|
||||
@@ -37,10 +55,20 @@ public class BsonSchemaTests
|
||||
|
||||
public class CollectionEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets tags.
|
||||
/// </summary>
|
||||
public List<string> Tags { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets scores.
|
||||
/// </summary>
|
||||
public int[] Scores { get; set; } = Array.Empty<int>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies schema generation for collection fields.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void GenerateSchema_Collections()
|
||||
{
|
||||
@@ -57,9 +85,15 @@ public class BsonSchemaTests
|
||||
|
||||
public class NestedEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the parent entity.
|
||||
/// </summary>
|
||||
public SimpleEntity Parent { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies schema generation for nested document fields.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void GenerateSchema_Nested()
|
||||
{
|
||||
@@ -73,9 +107,15 @@ public class BsonSchemaTests
|
||||
|
||||
public class ComplexCollectionEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets items.
|
||||
/// </summary>
|
||||
public List<SimpleEntity> Items { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies schema generation for collections of complex types.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void GenerateSchema_ComplexCollection()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user