public void FromDTO_ReturnsService_GivenServiceDTO() { // Arrange var mockRepo = new Mock <IServiceService <Service> >(); var controller = new ServicesController(mockRepo.Object); // Act var result = controller.FromDTO( new ServiceDTO(GetServiceSync(CodeServiceUsersControllerTests.GetListSync()), "moqUser")); // Assert Assert.IsType <Service>(result); Assert.Equal(1, result.ServiceId); Assert.Equal("Test One", result.Name); }