public async Task GenerateASolution() { // Arrange // Act var result = await sut.Generate(); // Assert Assert.That(result.Success, Is.True); Assert.That(result.Message, Is.EqualTo("Solution Generated")); Assert.That(result.Solution, Is.TypeOf <SudokuSolution>()); }
public async Task <ActionResult <SudokuSolution> > Generate() { var result = await solutionService.Generate(); if (result.Success) { result.Message = ControllerMessages.StatusCode200(result.Message); return(Ok(result)); } else { result.Message = ControllerMessages.StatusCode404(result.Message); return(NotFound(result)); } }