dUnit Testing in Delphi (how to test private methods)

Posted by Charles Faiga on Stack Overflow See other posts from Stack Overflow or by Charles Faiga
Published on 2009-01-07T22:10:49Z Indexed on 2010/03/13 9:55 UTC
Read the original article Hit count: 653

Filed under:

I have a class that I am unit testing into with dUnit It has a number of methods some public Methods & Private Methods

type
  TAuth = class(TDataModule)
  private
    procedure PrivateMethod;
  public
    procedure PublicMethod;
  end;

In order to write a unit test for this class I have to make all the methods public.

Is there a differt way to declare the PrivateMethods so that I can still unit test them but they are not Public ?

© Stack Overflow or respective owner

Related posts about delphi