public async Task GetAllAsyncWhenNoSolutionsReturnsEmptyCollection() { //Arrange var mockSolutionRepository = GetDefaultISolutionRepositoryInstance(); var mockUnitOfWork = GetDefaultIUnitOfWorkInstance(); var solutionId = 200; mockSolutionRepository.Setup(r => r.FindById(solutionId)) .Returns(Task.FromResult <Solution>(null)); var service = new SolutionService(mockSolutionRepository.Object, mockUnitOfWork.Object); //Act SolutionResponse result = await service.GetByIdAsync(solutionId); var message = result.Message; //Assert message.Should().Be("Solution not found"); }
public SubmittedSolution(int part, string solution, SolutionResponse response) { Part = part; Solution = solution; Response = response; }
private Task SolutionStatusChanged(SolutionResponse solutionResponse) { return(hubContext.Clients.User(solutionResponse.UserId) .UpdateSolutionStatus(solutionResponse)); }
public SubmittedSolution(params string[] stringData) { Part = int.Parse(stringData[0]); Solution = stringData[1]; Response = (SolutionResponse)int.Parse(stringData[2]); }