public async Task <ActionResult> GetBridgesPoint(long bridgespointId) { var presenter = new BridgesPointListPresenter(); await _getBridgesPointListUseCase.Handle(GetBridgesPointListUseCaseRequest.CreateBridgesPointRequest(bridgespointId), presenter); return(presenter.ContentResult); }
public void TestTryGetNotExistingBridgesPoint() { var useCase = new GetBridgesPointListUseCase(CreateBridgesPointtRepository()); var outputPort = new OutputPort(); Assert.True(useCase.Handle(GetBridgesPointListUseCaseRequest.CreateBridgesPointRequest(999), outputPort).Result); Assert.Empty(outputPort.BridgesPoints); }
public void TestGetBridgesPoint() { var useCase = new GetBridgesPointListUseCase(CreateBridgesPointtRepository()); var outputPort = new OutputPort(); Assert.True(useCase.Handle(GetBridgesPointListUseCaseRequest.CreateBridgesPointRequest(2), outputPort).Result); Assert.Single(outputPort.BridgesPoints, mp => 2 == mp.Id); }