# Class RelayServiceTest

Namespace
  adas_core.Test.Services

Assembly
  adas-core.Test.dll

    [TestFixture]
    public class RelayServiceTest

Inheritance
  object
  RelayServiceTest

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

### CheckRelayStatus_Return_Off()

    [Test]
    public Task CheckRelayStatus_Return_Off()

#### Returns

Task

### CheckRelayStatus_Return_On()

Verifies that `CheckRelayStatus` returns On when the mocked HTTP response indicates the relay is on.

    [Test]
    public Task CheckRelayStatus_Return_On()

#### Returns

Task

### CheckRelayStatus_Return_Unknown()

Verifies that `CheckRelayStatus` returns Unknown when the relay driver response does not match a recognized on/off state (e.g., the raw payload "\Off" is not mapped to a known status).

    [Test]
    public Task CheckRelayStatus_Return_Unknown()

#### Returns

Task

### PowerOffAsync()

Verifies that the relay service successfully powers off a relay by issuing an HTTP request through the configured HTTP client factory.

    [Test]
    public Task PowerOffAsync()

#### Returns

Task

### PowerOnAsync()

Verifies that PowerOn(Relay) correctly sends a power-on request to the configured relay device using the HTTP client.

    [Test]
    public Task PowerOnAsync()

#### Returns

Task

### Setup()

Sets up the test environment by initializing mocks and dependencies required for unit testing the RelayService, including logger, HTTP client factory, HTTP message handler, relay settings, point-of-care service, and relay repository.

    [SetUp]
    public void Setup()