コード例 #1
0
ファイル: UserInput.cs プロジェクト: slideroom/interview
    public void Adding_various_characters_to_TextInput()
    {
        TextInput input = new TextInput();

        input.Add('1');
        input.Add('a');
        input.Add('0');
        Assert.Equal("1a0", input.GetValue());
    }
コード例 #2
0
ファイル: TextInput.cs プロジェクト: juniormayhe/algorithms
    public static void Main(string[] args)
    {
        //TextInput input = new NumericInput();
        TextInput input = new TextInput();

        input.Add('1');
        input.Add('a');
        input.Add('0');
        Console.WriteLine(input.GetValue());
    }
コード例 #3
0
        public void AddTestTextInput()
        {
            TextInput input = new TextInput();

            input.Add('1');
            input.Add('m');
            input.Add('0');
            input.Add('!');
            Assert.AreEqual("1m0!", input.GetValue());
        }
コード例 #4
0
        public void TextInputTest()
        {
            TextInput input = new TextInput();

            input.Add('1');
            input.Add('a');
            input.Add('0');
            input.Add(' ');

            Assert.AreEqual(input.GetValue(), "1a0 ");
        }
コード例 #5
0
        public void TextInput_accepts_all_characters(string expected, params char[] values)
        {
            var input = new TextInput();

            foreach (var value in values)
            {
                input.Add(value);
            }

            var result = input.GetValue();

            Assert.Equal(expected, result);
        }
コード例 #6
0
ファイル: TextField.cs プロジェクト: wert007/StealthyGame
 protected override void _TextInput(object sender, TextInputEventArgs e)
 {
     textInput.Add(e);
 }