# Class ConfigUnitsServiceTest

Namespace
  adas_core.Test.Services

Assembly
  adas-core.Test.dll

    [TestFixture]
    public class ConfigUnitsServiceTest

Inheritance
  object
  ConfigUnitsServiceTest

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

### Map_Not_Find_Config_Return_same_obs()

Verifies that the Map method returns the original observation unchanged with a null Units property when configuration units are required and no matching config unit is found for the observation's code.

    [Test]
    public Task Map_Not_Find_Config_Return_same_obs()

#### Returns

Task

### Map_configUnitsRequired_false_Return_same_obs()

Verifies that when `ConfigUnitsRequired` is set to `false`, the Map(PumpObservation) method returns the same observation instance without applying any unit mapping or transformation.

    [Test]
    public Task Map_configUnitsRequired_false_Return_same_obs()

#### Returns

Task

### Map_configUnits_Return_obs_ConfigUnit()

Verifies that Map returns the configured unit value for a patient observation when ConfigUnitsRequired is enabled and a matching config unit is found in the repository.

    [Test]
    public Task Map_configUnits_Return_obs_ConfigUnit()

#### Returns

Task

### Map_not_units_Return_same_obs()

Verifies that mapping a patient observation that does not contain units returns the same observation unchanged, confirming the mapping logic preserves the original data when no unit conversion is applicable.

    [Test]
    public Task Map_not_units_Return_same_obs()

#### Returns

Task

### Setup()

Initializes the test dependencies and creates a new instance of ConfigUnitsService with mocked repository, options, and logger for use in unit tests.

    [SetUp]
    public void Setup()