public void CountTest() { count = new CountVo(100); Assert.AreEqual(100, count.Count); count.Add(); Assert.AreEqual(101, count.Count); }
public int CountUp(CountVo count) { if (count.Count < max) { count.Add(); } return(count.Count); }
async void IUseCase.Begin() { var init = await repository.GetCountAsync(); presenter.SetText($"{init}"); var count = new CountVo(init); presenter .ButtonClickObservable .Subscribe(async _ => { var oldCount = count.Count; var newCount = counter.CountUp(count); if (oldCount != newCount) { presenter.SetText($"{newCount}"); await repository.SetCountAsync(newCount); } }) .AddTo(disposables); }
public void SetUpTest() { countUp = new CountUpBr(10); count = new CountVo(0); }