-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Basic scaffolding for Message,Module
Includes tests for the scaffolding
- Loading branch information
Showing
10 changed files
with
242 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unit PolyKerma.Messages.Interfaces; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes | ||
; | ||
|
||
type | ||
{ IMessage } | ||
IMessage = Interface | ||
['{62E0D2A6-6AEE-42DF-BADD-D210BA7A2BD1}'] | ||
end; | ||
|
||
implementation | ||
|
||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
unit PolyKerma.Messages.Message; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes | ||
, PolyKerma.Messages.Interfaces | ||
; | ||
|
||
type | ||
{ TMessage } | ||
TMessage = class(TInterfacedObject, IMessage) | ||
private | ||
protected | ||
public | ||
constructor Create; | ||
destructor Destroy; override; | ||
|
||
published | ||
end; | ||
|
||
implementation | ||
|
||
{ TDispatcher } | ||
|
||
constructor TMessage.Create; | ||
begin | ||
|
||
end; | ||
|
||
destructor TMessage.Destroy; | ||
begin | ||
inherited Destroy; | ||
end; | ||
|
||
end. | ||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
unit PolyKerma.Modules.Interfaces; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes | ||
; | ||
|
||
type | ||
{ IModule } | ||
IModule = Interface | ||
['{3D802B56-58A0-4E9C-97D9-8602B52EF731}'] | ||
end; | ||
|
||
implementation | ||
|
||
end. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
unit PolyKerma.Modules.Module; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes | ||
, PolyKerma.Modules.Interfaces | ||
; | ||
|
||
type | ||
{ TModule } | ||
TModule = class(TInterfacedObject, IModule) | ||
private | ||
protected | ||
public | ||
constructor Create; | ||
destructor Destroy; override; | ||
|
||
published | ||
end; | ||
|
||
implementation | ||
|
||
{ TDispatcher } | ||
|
||
constructor TModule.Create; | ||
begin | ||
|
||
end; | ||
|
||
destructor TModule.Destroy; | ||
begin | ||
inherited Destroy; | ||
end; | ||
|
||
end. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
unit PolyKerma.Test.Messages; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes | ||
, SysUtils | ||
, fpcunit | ||
//, testutils | ||
, testregistry | ||
, PolyKerma.Messages.Interfaces | ||
, PolyKerma.Messages.Message | ||
; | ||
|
||
type | ||
|
||
TTestMessages= class(TTestCase) | ||
private | ||
FMessage: IMessage; | ||
protected | ||
public | ||
published | ||
procedure TestMessageCreate; | ||
end; | ||
|
||
implementation | ||
|
||
procedure TTestMessages.TestMessageCreate; | ||
begin | ||
FMessage:= TMessage.Create; | ||
AssertNotNull('Message not null', FMessage); | ||
end; | ||
|
||
|
||
|
||
initialization | ||
|
||
RegisterTest(TTestMessages); | ||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
unit PolyKerma.Test.Module; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes | ||
, SysUtils | ||
, fpcunit | ||
//, testutils | ||
, testregistry | ||
, PolyKerma.Modules.Interfaces | ||
, PolyKerma.Modules.Module | ||
; | ||
|
||
type | ||
|
||
TTestModule= class(TTestCase) | ||
private | ||
FModule: IModule; | ||
protected | ||
public | ||
published | ||
procedure TestModuleCreate; | ||
end; | ||
|
||
implementation | ||
|
||
procedure TTestModule.TestModuleCreate; | ||
begin | ||
FModule:= TModule.Create; | ||
AssertNotNull('Module not null', FModule); | ||
end; | ||
|
||
|
||
|
||
initialization | ||
|
||
RegisterTest(TTestModule); | ||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters