Class MasterListServiceTest
[TestFixture]
public class MasterListServiceTest
- Inheritance
-
MasterListServiceTest
- Inherited Members
- Extension Methods
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
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
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
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
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()