=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -22,6 +22,7 @@ public class UnitRepositoryTest
|
||||
/// <summary>
|
||||
/// One-time setup method that prepares the integration test environment by configuring API settings, creating a fresh "units" collection in the database, and seeding it with two sample <see cref="Unit"/> records via the <see cref="UnitRepository"/>.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=81c0015 body=a56e489 -->
|
||||
[OneTimeSetUp]
|
||||
public async Task Init()
|
||||
{
|
||||
@@ -65,6 +66,7 @@ public class UnitRepositoryTest
|
||||
/// <summary>
|
||||
/// Verifies that inserting a valid <see cref="Unit"/> into the repository returns the unit and that the inserted unit can be successfully retrieved by its identifier, with key properties preserved.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=9b26826 body=ddc8404 -->
|
||||
[Test]
|
||||
public async Task InsertOneUnit_ValidUnit_ReturnsUnit()
|
||||
{
|
||||
@@ -132,6 +134,7 @@ public class UnitRepositoryTest
|
||||
/// <summary>
|
||||
/// Verifies that FindById retrieves the matching <see cref="Unit"/> from the repository when a valid identifier is provided.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=502c001 body=dc7d781 -->
|
||||
[Test]
|
||||
public async Task FindById_ValidId_ReturnsUnit()
|
||||
{
|
||||
@@ -157,6 +160,7 @@ public class UnitRepositoryTest
|
||||
/// <summary>
|
||||
/// Verifies that FindById returns <c>null</c> when queried with an ID that does not exist in the repository.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=eeda1b7 body=fa50971 -->
|
||||
[Test]
|
||||
public async Task FindById_InvalidId_ReturnsNull()
|
||||
{
|
||||
@@ -214,6 +218,7 @@ public class UnitRepositoryTest
|
||||
/// Verifies that the repository's <c>FindByName</c> method returns the matching unit when called with a valid unit name.
|
||||
/// The test inserts a unit, retrieves it by name, and asserts that the returned entity is not null and has the expected name.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=1b153db body=e466985 -->
|
||||
[Test]
|
||||
public async Task FindByName_ValidName_ReturnsUnit()
|
||||
{
|
||||
@@ -239,6 +244,7 @@ public class UnitRepositoryTest
|
||||
/// <summary>
|
||||
/// Verifies that the repository's FindByName method returns null when invoked with a name that does not match any existing entity.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=bca62d2 body=2ab2e2d -->
|
||||
[Test]
|
||||
public async Task FindByName_InvalidName_ReturnsNull()
|
||||
{
|
||||
@@ -353,6 +359,7 @@ public class UnitRepositoryTest
|
||||
/// Verifies that <c>GetAll</c> returns a non-null collection containing the units that have been inserted into the repository.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentNullException">Thrown when the <c>units</c> collection used to seed the repository is <c>null</c>.</exception>
|
||||
/// <!-- aidoc:v1 sig=5b909a9 body=2d25d8f -->
|
||||
[Test]
|
||||
public async Task GetAll_ReturnsAllUnits()
|
||||
{
|
||||
@@ -381,6 +388,7 @@ public class UnitRepositoryTest
|
||||
/// <summary>
|
||||
/// Verifies that UpdateUnit correctly updates an existing unit in the repository and returns the updated entity with the new title and the original identifier.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=0c12e38 body=287b440 -->
|
||||
[Test]
|
||||
public async Task UpdateUnit_ValidUnit_ReturnsUpdatedUnit()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user