Ejemplo n.º 1
0
        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();
                }
            }
        }
Ejemplo n.º 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();
                }
            });
        }