public void GetLogHistoricoSemRegistros() { List <HistoricoDTO> historicoLog = null; var controller = new LogApiController(logService); controller.Request = new HttpRequestMessage(); controller.Configuration = new HttpConfiguration(); var response = controller.GetLogHistorico(); response.TryGetContentValue(out historicoLog); Assert.IsNotNull(historicoLog); Assert.AreEqual(0, historicoLog.Count); }
public void GetLogHistoricoComRegistros() { List <HistoricoDTO> historicoLog = null; var gameService = BuildGameService(); var gameId1 = gameService.IniciarGame(3).Id; var gameId2 = gameService.IniciarGame(4).Id; gameService.MovimentarDisco(gameId1); gameService.MovimentarDisco(gameId2); var controller = new LogApiController(logService); controller.Request = new HttpRequestMessage(); controller.Configuration = new HttpConfiguration(); var response = controller.GetLogHistorico(); response.TryGetContentValue(out historicoLog); Assert.IsNotNull(historicoLog); Assert.AreEqual(2, historicoLog.Count); }