Sha256: cb9114c51795406c2aa4d8ef00ce6140d7b86bfea772a092bd5c4da8540f15fc

Contents?: true

Size: 1.67 KB

Versions: 142

Compression:

Stored size: 1.67 KB

Contents

(******************************************************************************
 You got an error, which is exactly as it should be.
 This is the first step in the Test-Driven Development
 (TDD) process.

 The most important part of the error is

   "cannot compile"

 It's looking for a file named utwo-fer.pas that doesn't exist.

 To fix the error, create a unit file named utwo-fer.pas
 in the same directory as the file utwo-ferTest.pas.

 The beginning of the new unit file should contain a unit statement:

 unit utwo-fer;

 The new unit should contain Interface, Implementation, and End. statements.

 Hint: Delphi will take care of all this if you instruct it to add a new unit
 to your project.  Be sure to save the new unit as utwo-fer.pas before
 trying to compile again.

 For more guidance as you work on this exercise, see
 GETTING_STARTED.md.
******************************************************************************)
unit utwoferTest;

interface
uses
  DUnitX.TestFramework;

type
  [TestFixture]
  twoferTest = class(TObject)
  public
    [Test]
//    [Ignore('Comment the "[Ignore]" statement to run the test')]
    procedure No_name_given;

    [Test]
    [Ignore]
    procedure A_name_given;

    [Test]
    [Ignore]
    procedure Another_name_given;
  end;

implementation
uses utwofer;

procedure twoferTest.No_name_given;
begin
  Assert.AreEqual('One for you, one for me.', twoFer);
end;

procedure twoferTest.A_name_given;
begin
  Assert.AreEqual('One for Alice, one for me.', twoFer('Alice'));
end;

procedure twoferTest.Another_name_given;
begin
  Assert.AreEqual('One for Bob, one for me.', twoFer('Bob'));
end;

initialization
  TDUnitX.RegisterTestFixture(twoferTest);
end.

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
trackler-2.2.1.107 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.106 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.105 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.104 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.103 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.102 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.101 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.100 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.99 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.98 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.97 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.96 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.95 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.94 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.93 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.92 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.91 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.90 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.89 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.88 tracks/delphi/exercises/two-fer/utwoferTest.pas