Exemplo n.º 1
0
        public void WhileUpdating_IsUpdatingReturnsTrue()
        {
            ReactiveManipulator <int> manipulator = new ReactiveManipulator <int>(42);

            using (manipulator.PutReactiveIntoUpdatingState())
            {
                Assert.That(manipulator.Reactive.IsUpdating, $"{NameOf<Reactive<int>>()}.{nameof(Reactive<int>.IsUpdating)} was false during its update. ");
                TestContext.WriteLine($"{nameof(Reactive<int>.IsUpdating)} was {manipulator.Reactive.IsUpdating}. ");
            }
        }
Exemplo n.º 2
0
        public void WhileUpdating_IsInvalid()
        {
            ReactiveManipulator <int> manipulator = new ReactiveManipulator <int>(42);

            using (manipulator.PutReactiveIntoUpdatingState())
            {
                Assert.That(manipulator.Reactive.IsValid, Is.False,
                            $"{NameOf<Reactive<int>>()}.{nameof(Reactive<int>.IsValid)} was true during its update. ");
                TestContext.WriteLine($"{nameof(Reactive<int>.IsValid)} was {manipulator.Reactive.IsValid}. ");
            }
        }