Sha256: b859568a64f0cff8a552bfed640aaa8a9bd3af62462efd7a6ffa9a5113deb22b

Contents?: true

Size: 1.16 KB

Versions: 63

Compression:

Stored size: 1.16 KB

Contents

unit uPerfectNumbersTest;

interface
uses
  DUnitX.TestFramework;

type

  [TestFixture]
  PerfectNumbersTest = class(TObject) 
  public
    [TestCase('3','3')]
//    [TestCase('7','7')]
//    [TestCase('13','13')]
    procedure Can_classify_deficient_numbers(const aNumber: Integer);

//    [TestCase('6','6')]
//    [TestCase('28','28')]
//    [TestCase('496','496')]
    procedure Can_classify_perfect_numbers(const aNumber: Integer);

//    [TestCase('12','12')]
//    [TestCase('18','18')]
//    [TestCase('20','20')]
    procedure Can_classify_abundant_numbers(const aNumber: Integer);
  end;

implementation
uses uPerfectNumbers;

procedure PerfectNumbersTest.Can_classify_deficient_numbers(const aNumber: Integer);
begin
  Assert.AreEqual(Deficient, PerfectNumber.Classify(aNumber));
end;

procedure PerfectNumbersTest.Can_classify_perfect_numbers(const aNumber: Integer);
begin
  Assert.AreEqual(Perfect, PerfectNumber.Classify(aNumber));
end;

procedure PerfectNumbersTest.Can_classify_abundant_numbers(const aNumber: Integer);
begin
  Assert.AreEqual(Abundant, PerfectNumber.Classify(aNumber));
end;

initialization
  TDUnitX.RegisterTestFixture(PerfectNumbersTest);
end.

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
trackler-2.0.8.12 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.11 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.10 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.9 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.8 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.7 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.6 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.5 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.4 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.3 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.2 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.8.1 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.7.0 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.44 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.43 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.42 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.41 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.40 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.39 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas
trackler-2.0.6.38 tracks/delphi/exercises/perfect-numbers/uPerfectNumbersTest.pas