public void ValueInitedBeforeStartAsync() { var viewModel = new ViewModelForTests { DoubleNullableMoney = 0 }; var testPage = new ScaffoldTestPage { DataContext = viewModel }; TestPanel.Children.Add(testPage); EnqueueCallback(() => { Int32 expectedCaretPosition; Assert.IsTrue( "0|.00".ToSpecificValue(out expectedCaretPosition) == testPage.DoubleNullableMoneyTexBox.Converter.TextBeforeChangingNotNull ); Assert.IsTrue(expectedCaretPosition == testPage.DoubleNullableMoneyTexBox.SelectionStart); }); EnqueueTestComplete(); }
/// <summary> /// Initialization of any test method. /// </summary> public void TestInitialize(Panel testPanel) { var testPage = new ScaffoldTestPage(); CurrentTestBox = testPage.DoubleNullableMoneyTexBox; ViewModel = testPage.DataContext as ViewModelForTests; DoubleNullableMoneyTexBox = testPage.DoubleNullableMoneyTexBox; DoubleMoneyTexBox = testPage.DoubleMoneyTexBox; DecimalNullableMoneyTexBox = testPage.DecimalNullableMoneyTexBox; DecimalMoneyTexBox = testPage.DecimalMoneyTexBox; DoubleNullableMoneyTexBox.PartialDisabled = false; DoubleNullableMoneyTexBox.PartialDisabledOnInput = false; DoubleMoneyTexBox.PartialDisabled = false; DoubleMoneyTexBox.PartialDisabledOnInput = false; DecimalNullableMoneyTexBox.PartialDisabled = false; DecimalNullableMoneyTexBox.PartialDisabledOnInput = false; DecimalMoneyTexBox.PartialDisabled = false; DecimalMoneyTexBox.PartialDisabledOnInput = false; testPanel.Children.Add(testPage); }