public void PropertyValuesArePassedToView()
        {
            const string PropertyValue = "test value";

            using (var sandbox = new Sandbox("initial value")) {
                var window = new Window()
                {
                    Title = CurrentTestName
                };
                try {
                    sandbox.AttachTo(window);

                    sandbox.PropertyValue = PropertyValue;

                    window.Show();

                    sandbox.WaitReady(DefaultTimeout);

                    var actualPropertyValue = sandbox.GetPropertyValue();
                    Assert.AreEqual(PropertyValue, actualPropertyValue);
                } finally {
                    window.Close();
                }
            }
        }
Exemple #2
0
        public async Task PropertyValuesArePassedToView()
        {
            await Run(async() => {
                const string PropertyValue = "test value";
                using var sandbox          = new Sandbox("initial value");
                var window = new Window()
                {
                    Title = CurrentTestName
                };

                try {
                    sandbox.AttachTo(window);
                    sandbox.PropertyValue = PropertyValue;
                    window.Show();
                    await sandbox.Initialize();

                    var actualPropertyValue = await sandbox.GetPropertyValue();
                    Assert.AreEqual(PropertyValue, actualPropertyValue);
                } finally {
                    window.Close();
                }
            });
        }