# Class ConfigObservationRepositoryTest

Namespace
  adas_core.Test.Repositories

Assembly
  adas-core.Test.dll

    [TestFixture]
    [Category("Integration")]
    public class ConfigObservationRepositoryTest

Inheritance
  object
  ConfigObservationRepositoryTest

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Methods

### Delete_With_Base_DeleteAsync()

Verifies that the base delete operation removes a ConfigObservation from the repository. The test confirms the entity is absent before insertion, present after insertion, and absent again after deletion.

    [Test]
    public Task Delete_With_Base_DeleteAsync()

#### Returns

Task

### FindById_Find_Id_Return_Configs()

Verifies that the repository's FindById method returns a non-null configuration result when queried with a valid id.

    [Test]
    public Task FindById_Find_Id_Return_Configs()

#### Returns

Task

### FindById_Not_Find_Id_Return_Empty()

Verifies that the `FindById` repository method returns `null` when invoked with a newly generated, non-existing identifier.

    [Test]
    public Task FindById_Not_Find_Id_Return_Empty()

#### Returns

Task

### Init()

Initializes the integration test environment by recreating the "config_observations" MongoDB collection and seeding it with sample ConfigObservation records that cover different configuration scenarios, including coded and uncoded observations, parent coding system references, original name mappings, and observations with min/max alert thresholds and forced alert behavior.

    [OneTimeSetUp]
    public Task Init()

#### Returns

Task

### Update_Find_Id_Return_Update_Configs()

Verifies that an existing ConfigObservation can be retrieved by its identifier and subsequently updated, ensuring the updated entity reflects the new values.

    [Test]
    public Task Update_Find_Id_Return_Update_Configs()

#### Returns

Task

### Update_Not_Find_Id_Create_It()

Verifies that the repository's Update operation creates a new record when the provided identifier does not exist in the data store, instead of failing.

    [Test]
    public Task Update_Not_Find_Id_Create_It()

#### Returns

Task