Esempio n. 1
0
        public async void MyButtonActionAsyncDoesNotCrash()
        {
            //arrange
            var buttonActionTask = new TestableAsyncEvents().MyButtonActionAsync();

            //act
            await buttonActionTask;

            //assert
            Assert.That(buttonActionTask.Status, Is.EqualTo(TaskStatus.RanToCompletion));
        }
Esempio n. 2
0
        public async void MyButtonActionAsyncDoesNotCrashWithXUnit()
        {
            //arrange
            var buttonActionTask = new TestableAsyncEvents().MyButtonActionAsync();

            //act
            await buttonActionTask;

            //assert
            Assert.Equal(buttonActionTask.Status, TaskStatus.RanToCompletion);
        }