40 lines
675 B
ObjectPascal
40 lines
675 B
ObjectPascal
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.
|