コード例 #1
0
        public void IncrementCountTest()
        {
            ICoyoteRuntime runtime   = new CoyoteRuntime();
            var            viewmodel = new SecondCoyoteLibrary.Pages.CounterViewModel(runtime);

            viewmodel.CurrentCount    = 10;
            viewmodel.IncrementAmount = 3;
            viewmodel.IncrementCount();
            Assert.AreEqual(13, viewmodel.CurrentCount);
        }
コード例 #2
0
        public async Task IncrementCountTest()
        {
            SecondCoyoteLibrary.ICoyoteRuntime runtime = new CoyoteRuntime();
            var viewmodel = new SecondCoyoteLibrary.Pages.CounterViewModel(runtime);

            viewmodel.CurrentCount    = 10;
            viewmodel.IncrementAmount = 3;
            //var task =
            await viewmodel.IncrementCount();

            //task.Wait();
            Assert.Equal(13, viewmodel.CurrentCount);
        }