Ejemplo n.º 1
0
        public async void MachineRefTeams_Not_Exists()
        {
            var mock = new ServiceMockFacade <IMachineRepository>();

            mock.RepositoryMock.Setup(x => x.MachineRefTeams(default(int), It.IsAny <int>(), It.IsAny <int>())).Returns(Task.FromResult <List <MachineRefTeam> >(new List <MachineRefTeam>()));
            var service = new MachineService(mock.LoggerMock.Object,
                                             mock.RepositoryMock.Object,
                                             mock.ModelValidatorMockFactory.MachineModelValidatorMock.Object,
                                             mock.BOLMapperMockFactory.BOLMachineMapperMock,
                                             mock.DALMapperMockFactory.DALMachineMapperMock,
                                             mock.BOLMapperMockFactory.BOLLinkMapperMock,
                                             mock.DALMapperMockFactory.DALLinkMapperMock,
                                             mock.BOLMapperMockFactory.BOLMachineRefTeamMapperMock,
                                             mock.DALMapperMockFactory.DALMachineRefTeamMapperMock);

            List <ApiMachineRefTeamResponseModel> response = await service.MachineRefTeams(default(int));

            response.Should().BeEmpty();
            mock.RepositoryMock.Verify(x => x.MachineRefTeams(default(int), It.IsAny <int>(), It.IsAny <int>()));
        }