public void TestMethodWithoutScrollviewer() { string text = "Some text to display"; //var mock = new Mock<IViewModel>(); //mock.SetupGet(vm => vm.TheText).Returns(text); var cl = new ClientLogger(); cl.SendClientLogMessage("starting wtihout scrollviewer"); var view = new TextBoxWithoutScrollviewerBugPage() { DataContext = text }; view.Loaded += (s, e) => { cl.SendClientLogMessage("loaded view"); var textBlock = view.FindName("TheName") as TextBlock; Assert.AreEqual(text, textBlock.Text); EnqueueTestComplete(); }; this.TestPanel.Children.Add(view); }
public void TestMethodWithScrollViewerOriginal() { string text = "Some text to display"; var cl = new ClientLogger(); cl.SendClientLogMessage("starting original with scrollviewer"); var view = new TextBlockInScrollViewerBugPage() { DataContext = text }; var textBlock = view.FindName("TheName") as TextBlock; textBlock.Loaded += (s, e) => { cl.SendClientLogMessage("textbox loaded"); Assert.AreEqual(text, ((TextBlock)s).Text); EnqueueTestComplete(); }; this.TestPanel.Children.Add(view); }
public void ClientLoggingTesting_WhenClientSendsLogMessageViaClientLoggerClass_ShouldSucceed() { IClientLogger logger = new ClientLogger(); var result = logger.SendClientLogMessage("hello world"); Assert.IsTrue(result); }