public void ItemUpdatePage_LocationPicker_Changed_PrimaryHand_Should_Pass() { // Arrange var myPicker = (Picker)page.FindByName("LocationPicker"); myPicker.SelectedItem = "Primary Hand"; // Act page.LocationPicker_Changed(null, null); var myDamageStack = (StackLayout)page.FindByName("DamageStack"); var myRangeStack = (StackLayout)page.FindByName("RangeStack"); // Reset // Assert Assert.IsTrue(myDamageStack.IsVisible); Assert.IsTrue(myRangeStack.IsVisible); Assert.AreEqual(page.ViewModel.Data.Range, 1); }
public void ItemUpdatePage_Damage_OnStepperDamageChanged_Default_Should_Pass() { // Arrange var data = new ItemModel(); var ViewModel = new GenericViewModel <ItemModel>(data); page = new ItemUpdatePage(ViewModel); double oldDamage = 0.0; double newDamage = 1.0; Slider DamageSlider = (Slider)page.FindByName("DamageSlider"); var args = new ValueChangedEventArgs(oldDamage, newDamage); // Act page.OnSliderChanged(DamageSlider, args); // Reset // Assert Assert.IsTrue(true); // Got to here, so it happened... }