public void SelectButtonOnKey() { tlog.Debug(tag, $"SelectButtonOnKey START"); var testingTarget = new MySelectButton() { IsEnabled = true, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <SelectButton>(testingTarget, "Should return SelectButton instance."); Key key = null; var result = testingTarget.OnKey(key); tlog.Debug(tag, "OnKey : " + result); try { key = new Key() { State = Key.StateType.Down, }; testingTarget.OnKey(key); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"SelectButtonOnKey END (OK)"); }
public void SelectButtonHandleControlStateOnTouch() { tlog.Debug(tag, $"SelectButtonHandleControlStateOnTouch START"); var testingTarget = new MySelectButton() { IsEnabled = true, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <SelectButton>(testingTarget, "Should return SelectButton instance."); using (Touch touch = new Touch()) { try { testingTarget.MyHandleControlStateOnTouch(touch); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } } tlog.Debug(tag, $"SelectButtonHandleControlStateOnTouch END (OK)"); }
public void SelectButtonIndex() { tlog.Debug(tag, $"SelectButtonIndex START"); var testingTarget = new MySelectButton(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <SelectButton>(testingTarget, "Should return SelectButton instance."); testingTarget.MySelectGroup = new SelectGroupImpl(); tlog.Debug(tag, "Index : " + testingTarget.Index); tlog.Debug(tag, $"SelectButtonIndex END (OK)"); }
public void SelectOnTouch() { tlog.Debug(tag, $"SelectOnTouch START"); var testingTarget = new MySelectButton(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <SelectButton>(testingTarget, "Should return SelectButton instance."); using (Touch touch = new Touch()) { var result = testingTarget.OnTouch(touch); tlog.Debug(tag, "OnTouch : " + result); } tlog.Debug(tag, $"SelectOnTouch END (OK)"); }
public void SelectButtonOnControlStateChanged() { tlog.Debug(tag, $"SelectButtonOnControlStateChanged START"); var testingTarget = new MySelectButton() { IsEnabled = true, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <SelectButton>(testingTarget, "Should return SelectButton instance."); Key key = new Key() { State = Key.StateType.Up, KeyPressedName = "Return" }; testingTarget.OnKey(key); testingTarget.SelectedChanged += OnSelectedChanged; try { ControlStateChangedEventArgs args = new ControlStateChangedEventArgs(ControlState.Selected, ControlState.Normal); testingTarget.MyOnControlStateChanged(args); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.SelectedChanged -= OnSelectedChanged; testingTarget.Dispose(); tlog.Debug(tag, $"SelectButtonOnControlStateChanged END (OK)"); }