# Class TreatmentServiceTest

Namespace
  adas_core.Test.Services

Assembly
  adas-core.Test.dll

    [TestFixture]
    public class TreatmentServiceTest

Inheritance
  object
  TreatmentServiceTest

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

### GetActiveTreatmentsByPatient()

Verifies that `GetActiveTreatmentsByPatient` retrieves the full set of active treatments for the specified patient, returning a non-empty collection that includes all expected treatment records identified by their placer order entity identifiers.

    [Test]
    public Task GetActiveTreatmentsByPatient()

#### Returns

Task

### SaveRequest_Find_Patient_Return_insert()

Verifies that SaveRequest does not insert a new patient treatment into the treatment archive when an existing patient is found by patient number.

    [Test]
    public Task SaveRequest_Find_Patient_Return_insert()

#### Returns

Task

### SaveRequest_Not_Case_option_Return_not_insert()

Verifies that saving an ApiRequest without the Case option throws an ApiRequestException, preventing the insert operation.

    [Test]
    public void SaveRequest_Not_Case_option_Return_not_insert()

#### Exceptions

ApiRequestException

  Thrown by the service when the Case option is not provided in the request.

### SaveRequest_Not_Find_Patient_Return_not_insert()

Verifies that _treatmentService.SaveRequest does not insert a patient treatment record when the patient cannot be found in the archive.

    [Test]
    public Task SaveRequest_Not_Find_Patient_Return_not_insert()

#### Returns

Task

### SaveRequest_patientNumber_and_pointOfCare_null_Return_not_insert()

Verifies that _treatmentService.SaveRequest throws an ApiRequestException when the ApiRequest is missing both the patient number and the point of care, preventing insertion of an incomplete request.

    [Test]
    public void SaveRequest_patientNumber_and_pointOfCare_null_Return_not_insert()

### Setup()

Initializes the mock dependencies and creates a TreatmentService instance for unit testing.

    [SetUp]
    public void Setup()