# Class PointOfCareServiceTests

Namespace
  adas_core.Test.Services

Assembly
  adas-core.Test.dll

    [TestFixture]
    public class PointOfCareServiceTests

Inheritance
  object
  PointOfCareServiceTests

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

### CheckNextAdmission_ValidPatientLocation_UpdatesPoCStatus_AndCallsUpdate()

    [Test]
    public void CheckNextAdmission_ValidPatientLocation_UpdatesPoCStatus_AndCallsUpdate()

### Delete_ValidObjectId_DeletesPointOfCare()

Verifies that the Delete(ObjectId) method successfully deletes a `PointOfCare` when invoked with a valid MongoDB.Bson.ObjectId whose associated admission is `null`, ensuring the underlying repository's delete operation is invoked.

    [Test]
    public Task Delete_ValidObjectId_DeletesPointOfCare()

#### Returns

Task

### FindByBed_ValidBed_CallsRepositoryFindByBed()

Verifies that the FindByBed(string) method correctly delegates to the repository's FindByBed method when a valid bed identifier is provided, returning the expected collection of point of care records.

    [Test]
    public Task FindByBed_ValidBed_CallsRepositoryFindByBed()

#### Returns

Task

### FindById_ValidId_ReturnsPointOfCare()

Verifies that `FindById` returns the expected PointOfCare when a valid identifier is provided.

    [Test]
    public Task FindById_ValidId_ReturnsPointOfCare()

#### Returns

Task

### FindByRoom_ValidRoom_CallsRepositoryFindByRoom()

Tests that the service's FindByRoom method, when called with a valid room, returns the collection provided by the repository and invokes the repository's FindByRoom exactly once.

    [Test]
    public Task FindByRoom_ValidRoom_CallsRepositoryFindByRoom()

#### Returns

Task

### FindByUnitAndStatus_ValidUnitIdAndStatus_ReturnsListOfPointOfCare()

Verifies that FindByUnitAndStatus(ObjectId, PointOfCare, bool) returns the expected list of point-of-care records when invoked with a valid unit identifier and status.

    [Test]
    public Task FindByUnitAndStatus_ValidUnitIdAndStatus_ReturnsListOfPointOfCare()

#### Returns

Task

### GetAll_NoArguments_ReturnsListOfPointOfCare()

Verifies that GetAll() returns the complete list of point of care records provided by the repository when invoked with no arguments.

    [Test]
    public Task GetAll_NoArguments_ReturnsListOfPointOfCare()

#### Returns

Task

### SetUp()

Initializes the mock dependencies and test environment required for unit testing the PointOfCareService. Configures repository, service, cache, admission, unit, and HTTP context mocks, including a simulated authenticated user and cache behavior that invokes the supplied factory directly to return the produced PointOfCare instance.

    [SetUp]
    public void SetUp()

### UpdateConfiguration_ValidIdAndConfiguration_InvokesRepositoryUpdateConfiguration()

Verifies that UpdateConfiguration(ObjectId, PointOfCareConfiguration) throws a ConflictException when invoked with a valid id and configuration, ensuring the service surfaces conflict conditions during the update operation.

    [Test]
    public void UpdateConfiguration_ValidIdAndConfiguration_InvokesRepositoryUpdateConfiguration()

### Update_ValidPointOfCare_UpdatesPointOfCare()

Verifies that the Update(PointOfCare) method successfully updates a valid PointOfCare instance by delegating the operation to the underlying repository.

    [Test]
    public Task Update_ValidPointOfCare_UpdatesPointOfCare()

#### Returns

Task

  A Task representing the asynchronous test execution.