From 269643ad2ade8e434d115d478748fc2563e3014d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Sat, 9 Dec 2023 01:00:36 +0100 Subject: [PATCH] Refactored the Trebuchet test cases --- tests/UTrebuchetTestCases.pas | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/UTrebuchetTestCases.pas b/tests/UTrebuchetTestCases.pas index f74afdd..d3b7136 100644 --- a/tests/UTrebuchetTestCases.pas +++ b/tests/UTrebuchetTestCases.pas @@ -45,15 +45,15 @@ type procedure TestPart1; end; - { TPart2ExampleTrebuchet } + { TExample2Trebuchet } - TPart2ExampleTrebuchet = class(TTrebuchet) + TExample2Trebuchet = class(TTrebuchet) function GetDataFileName: string; override; end; - { TTrebuchetPart2ExampleTestCase } + { TTrebuchetExample2TestCase } - TTrebuchetPart2ExampleTestCase = class(TExampleEngineBaseTest) + TTrebuchetExample2TestCase = class(TExampleEngineBaseTest) protected function CreateSolver: ISolver; override; published @@ -91,21 +91,21 @@ begin AssertEquals(142, FSolver.GetResultPart1); end; -{ TPart2ExampleTrebuchet } +{ TExample2Trebuchet } -function TPart2ExampleTrebuchet.GetDataFileName: string; +function TExample2Trebuchet.GetDataFileName: string; begin Result := 'trebuchet_calibration_document2.txt'; end; -{ TTrebuchetPart2ExampleTestCase } +{ TTrebuchetExample2TestCase } -function TTrebuchetPart2ExampleTestCase.CreateSolver: ISolver; +function TTrebuchetExample2TestCase.CreateSolver: ISolver; begin - Result := TPart2ExampleTrebuchet.Create; + Result := TExample2Trebuchet.Create; end; -procedure TTrebuchetPart2ExampleTestCase.TestPart2; +procedure TTrebuchetExample2TestCase.TestPart2; begin AssertEquals(281, FSolver.GetResultPart2); end; @@ -114,5 +114,5 @@ initialization RegisterTest(TTrebuchetFullDataTestCase); RegisterTest(TTrebuchetExampleTestCase); - RegisterTest(TTrebuchetPart2ExampleTestCase); + RegisterTest(TTrebuchetExample2TestCase); end.