public async Task GetByName_ReturnsNotContent_GivenNull()
        {
            // Arrange
            var mockRepo  = new Mock <IServiceService <Service> >();
            var returning = "invalid";
            var dbMock    = GetService(null, returning);

            mockRepo.Setup(x => x.GetByName(It.IsAny <string>())).Returns(dbMock);

            var controller = new ServicesController(mockRepo.Object);

            // Act
            var result = await controller.GetByName("Service Name");

            // Assert
            Assert.IsType <NoContentResult>(result);
        }
        public async Task GetByName_ReturnsServiceDTO_GivenService()
        {
            // Arrange
            var mockRepo = new Mock <IServiceService <Service> >();
            var dbMock   = GetService(CodeServiceUsersControllerTests.GetListSync());

            mockRepo.Setup(x => x.GetByName(It.IsAny <string>())).Returns(dbMock);

            var controller = new ServicesController(mockRepo.Object);

            // Act
            var result = await controller.GetByName("Service Name");

            // Assert
            var okResult      = Assert.IsType <OkObjectResult>(result);
            var returnService = Assert.IsType <ServiceDTO>(okResult.Value);

            Assert.Equal("Test One", returnService.Name);
        }