Unit2Test.pas
上传用户:yjb1804
上传日期:2021-01-30
资源大小:3105k
文件大小:1k
源码类别:

Email服务器

开发平台:

Delphi

  1. unit Unit2Test;
  2. interface
  3. uses
  4.   TestFramework, Unit2;
  5. type
  6.   TTestSuperObject = class(TTestCase)
  7.   private
  8.     FSuperObject: TSuperObject;
  9.   public
  10.     procedure Setup; override;
  11.     procedure TearDown; override;
  12.   published
  13.     procedure testSuperObject;
  14.   end;
  15. implementation
  16. { TTestSuperObject }
  17. procedure TTestSuperObject.Setup;
  18. begin
  19.   FSuperObject := TSuperObject.Create;
  20. end;
  21. procedure TTestSuperObject.TearDown;
  22. begin
  23.   FSuperObject.Free;
  24. end;
  25. procedure TTestSuperObject.testSuperObject;
  26. begin
  27.   check(FSuperObject.DoSomethingSuper);
  28. end;
  29. initialization
  30.   RegisterTest('', TTestSuperObject.Suite);
  31. end.