CodePlexProject Hosting for Open Source Software
An unexpected error has occured.
There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Voted
SDeKock wrote Feb 23, 2012 at 3:49 PM
antonkulaga wrote Mar 3, 2012 at 9:29 PM
antonkulaga wrote Mar 3, 2012 at 9:30 PM
public class AgunitCrashTest:SilverlightTest { public Canvas MyCanvas; public Button MyButton; [TestInitialize] public void SetUp() { this.MyCanvas = new Canvas() {Width = 1000, Height = 1000}; this.TestPanel.Children.Add(this.MyCanvas); this.MyButton = new Button(){Content = "SomeContent",Width = 200,Height = 200}; Canvas.SetLeft(MyButton,200); Canvas.SetTop(MyButton,200); this.MyCanvas.Children.Add(MyButton); TestPanel.UpdateLayout(); } [TestCleanup] public void CleanUp() { this.TestPanel.Children.Remove(MyCanvas); this.MyCanvas.Children.Remove(MyButton); this.MyCanvas = null; this.MyButton = null; } /// <summary> /// This test passes in default silverlight testing enviroment but fails in AgUnit for Resharper 6.1 enviroment /// </summary> [TestMethod] public void AgUnitFailureTest() { TestPanel.UpdateLayout(); this.MyButton.GetBounds(); var t = this.MyButton.TransformToVisual(this.MyCanvas); // This test passes in default silverlight testing enviroment but fails in AgUnit for Resharper 6.1 enviroment var bounds = new Rect(t.Transform(new Point(0, 0)), this.MyButton.RenderSize); //place of the crash Assert.AreEqual(200,bounds.X); Assert.AreEqual(200,bounds.Y); Assert.AreEqual(bounds.Width,MyButton.ActualWidth); Assert.AreEqual(bounds.Height,MyButton.ActualHeight); } }
SDeKock wrote Mar 3, 2012 at 10:00 PM
staxmanade wrote Mar 4, 2012 at 5:18 AM
antonkulaga wrote Mar 16, 2012 at 1:22 PM
SDeKock: This could possibly be fixed by allowing the U.I. to show up. You can specify this in statlight by passing WindowGeometry object witht eh BrowserWindowState = BrowserWindowState.Normal.
Not sure this should become a hard-coded solution in AgUnit. Possibly look to make this a configuration option?
antonkulaga wrote Sep 1, 2012 at 3:25 PM
SDeKock wrote Sep 1, 2012 at 4:54 PM
Sign in to add a comment or to set email notifications
Keyboard shortcuts are available for this page.