// GET /detail/x public async Task <IActionResult> Detail(Guid id) { var presenter = new MvcLogbookDetailsPresenter(relativeUrlGenerator, logbookDetailsUrlGenerator); var interactorResult = await mediator.Send(new GetLogbookEntryDetails(id, presenter)); if (!interactorResult.IsSuccessful) { ShowErrorMessage("Fehler beim laden der Daten des Logbucheintrages!"); } return(View(presenter.GetViewModel())); }
public GetLogbookEntryDetailsInteractorTests() { A.CallTo(() => repository.FindByIdAsync(A <Guid> ._)) .ReturnsLazily(call => Task.FromResult( (Guid)call.Arguments[0] == validId ? new LogbookEntry { Id = validId, Title = "Test", OriginalAuthor = new Diver { Fullname = "John Doe", AvatarId = "joe1", User = new IdentityUser { Email = "*****@*****.**" } } } : null)); presenter = new MvcLogbookDetailsPresenter(relativeUrlGenerator, detailsUrlGenerator); interactor = new GetLogbookEntryDetailsInteractor(logger, repository, currentUser); }