1
0
mirror of synced 2024-11-14 15:03:51 +00:00
x2utils/UnitTests/Units/XMLDataBindingUtilsTest.pas

40 lines
675 B
ObjectPascal
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

unit XMLDataBindingUtilsTest;
interface
uses
TestFramework;
type
TXMLDataBindingUtilsTest = class(TTestCase)
published
procedure TestIsValidXMLChar;
procedure TestGetValidXMLText;
end;
implementation
uses
XMLDataBindingUtils;
{ TXMLDataBindingUtilsTest }
procedure TXMLDataBindingUtilsTest.TestIsValidXMLChar;
begin
CheckTrue(IsValidXMLChar('A'));
CheckTrue(IsValidXMLChar('ë'));
CheckFalse(IsValidXMLChar(#$1A));
end;
procedure TXMLDataBindingUtilsTest.TestGetValidXMLText;
begin
CheckEquals('AB', GetValidXMLText('AB'));
end;
initialization
RegisterTest(TXMLDataBindingUtilsTest.Suite);
end.