コード例 #1
0
 public void TestUpdate()
 {
     _textBoxInspectorsCollection.Inspectors.AddRange(new List <IInputInspector> {
         new TextBoxIsMailInspector(TestDefinition.DUMP_STRING, TestDefinition.DUMP_INTEGER), new TextBoxIsNotEmptyInspector(TestDefinition.DUMP_STRING, TestDefinition.DUMP_INTEGER), new TextBoxIsOfFullLengthInspector(TestDefinition.DUMP_STRING, TestDefinition.DUMP_INTEGER)
     });
     _textBoxInspectorsCollection.Update("賀", 999);
     for (int index = 0; index <= 2; index++)
     {
         Assert.AreEqual((( TextBoxInspector )_textBoxInspectorsCollection.Inspectors[index]).Text, "賀");
         Assert.AreEqual((( TextBoxInspector )_textBoxInspectorsCollection.Inspectors[index]).MaxTextLength, 999);
     }
 }
 /// <summary>
 /// Update the textbox inspectors collection.
 /// </summary>
 private void UpdateTextBoxInspectorsCollection()
 {
     _textBoxInspectorsCollection.Update(this.Text, this.MaxLength);
     NotifyObserverChangeTextBoxInspectorsCollection();
 }