Table of Contents

Class MongodbMigrationTest

Namespace
adas_core.Test.Repositories
Assembly
adas-core.Test.dll
[TestFixture]
[Category("Integration")]
public class MongodbMigrationTest
Inheritance
MongodbMigrationTest
Inherited Members
Extension Methods

Methods

AfterUpdateToLatest_MigrationShouldBeApplied()

Verifies that after running the migration update to the latest version, the migration with ID 10 (version 0.1.0) is present among the applied migrations.

[Test]
[Order(2)]
public void AfterUpdateToLatest_MigrationShouldBeApplied()

Init()

Performs one-time initialization for the test fixture by dropping and recreating the "patients" collection, instantiating the PatientRepository, and seeding it with three test Patient records (one of which has a discharge time set to the current time) to verify they are persisted.

[OneTimeSetUp]
public Task Init()

Returns

Task

IsDatabaseOutdated_ShouldReturnTrue()

Verifies that the database is detected as outdated by creating a runner and asserting that IsDatabaseUpToDate returns false when using the primary read preference.

[Test]
[Order(1)]
public void IsDatabaseOutdated_ShouldReturnTrue()

RunningMigrationsTwice_ShouldNotFail()

[Test]
public void RunningMigrationsTwice_ShouldNotFail()

Teardown()

Performs one-time cleanup after integration tests by dropping the patients and __migrations collections from the integration database, ensuring a clean state for subsequent test runs.

[OneTimeTearDown]
public void Teardown()