Пример #1
0
        public void when_closed_action_is_executed()
        {
            var supportClose = new SupportClosing();

            var result = false;

            supportClose.ExecuteOnClosed(() => result = true);

            supportClose.ClosingStrategy.Close();

            Assert.That(result, Is.True);
        }
Пример #2
0
        public void when_closed_action_is_executed()
        {
            var supportClose = new SupportClosing();

            var result = false;

            supportClose.ExecuteOnClosed(() => result = true);

            supportClose.ClosingStrategy.Close();

            Assert.That(result, Is.True);
        }
Пример #3
0
        public void when_parent_closes_then_the_child_closes()
        {
            var parent = new SupportClosing();

            var child = new SupportClosing();

            var result = false;

            child.ExecuteOnClosed(() => result = true);

            child.SyncViewModelClose(parent);

            parent.ClosingStrategy.Close();

            Assert.That(result, Is.True);
        }
Пример #4
0
        public void when_parent_closes_then_the_child_closes()
        {
            var parent = new SupportClosing();

            var child = new SupportClosing();

            var result = false;

            child.ExecuteOnClosed(() => result = true);

            child.SyncViewModelClose(parent);

            parent.ClosingStrategy.Close();

            Assert.That(result, Is.True);
        }