Sha256: ccada4a72f9df9dd907215eeb7858af6e19f38b767e6932109ca2dc7918bc622

Contents?: true

Size: 1.71 KB

Versions: 71

Compression:

Stored size: 1.71 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;
  
const
  CanonicalVersion = '1.2.0';

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

71 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.179 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.178 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.177 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.176 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.175 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.174 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.173 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.172 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.171 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.170 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.169 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.167 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.166 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.165 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.164 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.163 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.162 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.161 tracks/delphi/exercises/two-fer/utwoferTest.pas
trackler-2.2.1.160 tracks/delphi/exercises/two-fer/utwoferTest.pas