public void SetBeside_WhereThreeNumberAreRight_test() { #region Arrange RandomNumber _randomNumber = new RandomNumber(1, 2, 3, 4); UserNumber _userNumber = new UserNumber(4, 3, 2, 5); EnteredNumber _enteredNumber = new EnteredNumber(_randomNumber, _userNumber); #endregion #region Assert Assert.IsTrue(_enteredNumber.Beside == "---"); #endregion }
void OnTranslate(object sender, System.EventArgs e) { translatedNumber = PhonewordTranslator.ToNumber(EnteredNumber.Text); if (translatedNumber != null) { CallBtn.IsEnabled = true; CallBtn.Text = string.Format("Call {0}", translatedNumber); } else { DisplayAlert("Phoneword", "The number entered is unsupported, Please re-enter a number", "OK"); CallBtn.IsEnabled = false; EnteredNumber.Text = string.Empty; CallBtn.Text = "Call"; EnteredNumber.Focus(); } }
public void SetPrecisely_WhereAllNumbersAreRight_test() { #region Arrange RandomNumber _randomNumber = new RandomNumber(); UserNumber _userNumber = new UserNumber(_randomNumber.FirstNumber.Value, _randomNumber.SecondNumber.Value, _randomNumber.ThirdNumber.Value, _randomNumber.FourthNumber.Value); EnteredNumber _enteredNumber = new EnteredNumber(_randomNumber, _userNumber); #endregion #region Assert Assert.IsTrue(_enteredNumber.Precisely == "****"); #endregion }
public void DisplayText() { squareText.GetComponent <Text>().text = EnteredNumber <= 0 ? " " : EnteredNumber.ToString(); }
private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e) { EnteredNumber.Focus(); }