# Class MasterListServiceTest

Namespace
  adas_core.Test.Services

Assembly
  adas-core.Test.dll

    [TestFixture]
    public class MasterListServiceTest

Inheritance
  object
  MasterListServiceTest

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

### DeleteMasterListById_ShouldCallRepositoryDelete_WhenMasterListFound()

Verifies that `DeleteMasterListById` invokes the repository's `Delete` method once with the provided identifier when the master list is found.

    [Test]
    public Task DeleteMasterListById_ShouldCallRepositoryDelete_WhenMasterListFound()

#### Returns

Task

### GetMasterListById_ShouldReturnMasterList_WhenFound()

Verifies that the service returns the master list when it is found by the specified id.

    [Test]
    public Task GetMasterListById_ShouldReturnMasterList_WhenFound()

#### Returns

Task

### GetMasterListByName_ShouldReturnMasterList_WhenFound()

Verifies that `GetMasterListByName` returns the matching MasterList when a master list with the specified name is found in the repository.

    [Test]
    public Task GetMasterListByName_ShouldReturnMasterList_WhenFound()

#### Returns

Task

### InsertMasterList_ShouldReturnInsertedMasterList()

Verifies that the InsertMasterList service method returns the same MasterList instance that was inserted, ensuring the service correctly retrieves the inserted entity by its identifier after persistence.

    [Test]
    public Task InsertMasterList_ShouldReturnInsertedMasterList()

#### Returns

Task

### Setup()

Initializes all required mock dependencies and constructs a MasterListService<T> instance for use in unit tests. Configures the HTTP context with a test user principal, registers the master list repository in the service provider, and supplies default API settings.

    [SetUp]
    public void Setup()

### UpdateMasterList_ShouldReturnUpdatedMasterList()

Verifies that UpdateMasterList returns the updated master list when the repository successfully completes the update and finds the entity by id.

    [Test]
    public Task UpdateMasterList_ShouldReturnUpdatedMasterList()

#### Returns

Task

  A Task representing the asynchronous test execution.