I am trying to compare the first entry in a TstringList. The compiler doesn't return any errors but when I run the test the first test passes and the second test receives a failed test of:
first entry did not go in : "sky - I believe I can fly" should be : "sky - I believe I can fly"
Here is my code.
procedure TestTForm1.TestButtonAddExecute;
var
Sender: TObject;
Stemp : string;
begin
Stemp := 'sky - I believe I can fly';
txtInput.Text := Stemp;
FForm1.ButtonAddExecute(Sender);
// TODO: Validate method results
Check(FForm1.txtInput.Text='', 'Input text did not clear after adding : "'+FForm1.txtInput.Text+ '" should be :"'+Stemp+'"');
Check(FForm1.ListBox.Items[1]= Stemp,'first entry did not go in : "'+Stemp +'" should be : "' +Stemp+'"');
end;
Any point in the right direction would be nice. Thank you.
Aucun commentaire:
Enregistrer un commentaire