ApprovalTests.Tests.Wpf.WpfBindingTests.TestFailedBindings C# (CSharp) Method

TestFailedBindings() private method

private TestFailedBindings ( ) : void
return void
        public void TestFailedBindings()
        {
            var viewModel = new TestViewModel();
            Binding myBinding = new Binding(TestViewModel.MyPropertyPropertyName + "BOGUS");
            myBinding.Source = viewModel;
            var e = ExceptionUtilities.GetException(() => WpfBindingsAssert.BindsWithoutError(viewModel, () =>
            {
                var textBox = new TextBox();
                textBox.SetBinding(TextBox.TextProperty, myBinding);
                return textBox;
            }));
            Approvals.Verify(e.Message, s => Regex.Replace(s, @"\(HashCode=\d+\)", "(Hashcode)"));
        }
    }
WpfBindingTests