public async Task TestInteractorGetModelFromModelCreator() { int userId = 0; var model = new ViewModel("fname", "lname", "", ""); _modelCreatorMock.Setup(f => f.GetModel(userId)) .Returns(Task.FromResult(model)); await _interactor.Get(userId); _modelCreatorMock.Verify(f => f.GetModel(userId), Times.Once); }
public async Task Init(int id) { var model = await _interactor.Get(id); if (model == null) { _view.SetFName(""); _view.SetLName(""); } else { _view.SetFName(model.fname); _view.SetLName(model.lname); } }
public async void GoToDetailsPage(int userId) { var model = await _interactor.Get(userId); _router.GoToDetailsPage(model.fname, model.lname, model.phone, model.iconPicture); }