public async Task AddNewCounter_AAA_SaveToRepositoryAndReturnTrue() { // Act var result = await service.AddNewCounter("AAA"); // Assert repository.Verify(r => r.SaveOrReplace(It.Is <Counter>(c => c.Name.Equals("AAA")))); Assert.IsTrue(result); }
public async Task AddNewCounter(string counterName) { if (await counterService.AddNewCounter(counterName) == false) { return; } messenger.PostMessage(await CreateCountersChangedMessage()); }
async Task Save() { if (counter.Id == null) { await service.AddNewCounter(counter.Account, counter.Password); } else { await service.UpdateAccount(counter); } await navigationService.Close(this); }
async Task Save() //Adds a new counter and then closes the view model { await service.AddNewCounter(counter.Name); await navigationService.Close(this); }
async Task Save() { await service.AddNewCounter(counter.Name); await navigationService.Close(this); }
async Task Save() { await service.AddNewCounter(counter.Name); navigationService.GoBack(); }