public void ShouldSetWrappedWindowTitleWhenSettingTitle() { TestableFloatableWindowAdapter window = this.CreateTestableAdapter(); Assert.IsNull(window.WrappedWindow.Title); window.Title = "Window"; Assert.AreEqual("Window", window.Title); Assert.AreEqual("Window", window.WrappedWindow.Title); }
public void ShouldSetContentWhenSetContentIsCalled() { TestableFloatableWindowAdapter window = this.CreateTestableAdapter(); TextBlock t = new TextBlock { Text = "TestText" }; window.Content = t; Assert.AreSame(t, window.WrappedWindow.Content); }
public void ShouldSetWrappedWindowStyleWhenSettingStyle() { TestableFloatableWindowAdapter window = this.CreateTestableAdapter(); Assert.IsNull(window.WrappedWindow.Style); Style windowStyle = new Style(typeof(FloatableWindow)); window.Style = windowStyle; Assert.AreSame(window.Style, window.WrappedWindow.Style); Assert.AreSame(windowStyle, window.Style); }
public void ShouldUpdateCanvasLeftPropertyWhenSettingLeftInNonModalWindow() { TestableFloatableWindowAdapter window = this.CreateTestableAdapter(); double left = (double)window.WrappedWindow.GetValue(Canvas.LeftProperty); Assert.AreEqual(0, left); Assert.AreEqual(0, window.Left); window.Left = 15; window.Show(this.rootPanel); left = (double)window.WrappedWindow.GetValue(Canvas.LeftProperty); Assert.AreEqual(15, left); }
public void ShouldUpdateCanvasTopPropertyWhenSettingTopInNonModalWindow() { TestableFloatableWindowAdapter window = this.CreateTestableAdapter(); double top = (double)window.WrappedWindow.GetValue(Canvas.TopProperty); Assert.AreEqual(0, top); Assert.AreEqual(0, window.Top); window.Top = 15; window.Show(this.rootPanel); top = (double)window.WrappedWindow.GetValue(Canvas.TopProperty); Assert.AreEqual(15, top); }