Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanMaron committed Oct 3, 2024
1 parent 4b2ac97 commit f5ea3be
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
5 changes: 5 additions & 0 deletions MSDyn365BC.Ntfy.Test/doubles/DummyNtfyTypeNTSTM.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ codeunit 50006 DummyNtfyTypeNTSTM implements INtfyEventNTSTM
begin
exit(GetMessageWasCalled);
end;

procedure GetTitle(NtfyEvent: Record NtfyEventNTSTM; Params: Dictionary of [Text, Text]) ReturnValue: Text[150]
begin

end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ codeunit 50008 MarkingTestTypeNTSTM implements INtfyEventNTSTM

procedure FilterNtfyEntriesBeforeBatchSend(var NtfyEvent: Record NtfyEventNTSTM; Params: Dictionary of [Text, Text]);
begin
NtfyEvent.SetRange(NtfyTopic, 'true');
NtfyEvent.SetRange(Topic, 'true');
end;

procedure DoCallNtfyEvent(NtfyEvent: Record NtfyEventNTSTM; Params: Dictionary of [Text, Text]) ReturnValue: Boolean;
Expand All @@ -25,4 +25,8 @@ codeunit 50008 MarkingTestTypeNTSTM implements INtfyEventNTSTM

end;

procedure GetTitle(NtfyEvent: Record NtfyEventNTSTM; Params: Dictionary of [Text, Text]) ReturnValue: Text[150]
begin

end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ codeunit 50003 RestWrapBodyPassNTSTM implements IRestWrapperNTSTM
begin
Assert.AreEqual(TempContentText, Content.AsText(), 'Content is not the same');
end;

procedure SetDefaultRequestHeader(Name: Text; Value: Text)
begin

end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ codeunit 50001 RestWrapperTestBodyNTSTM implements IRestWrapperNTSTM
procedure Post(RequestUri: Text; Content: Codeunit System.RestClient."Http Content") HttpResponseMessage: Codeunit System.RestClient."Http Response Message"
begin
end;

procedure SetDefaultRequestHeader(Name: Text; Value: Text)
begin

end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ codeunit 50002 RestWrapperTestPostNTSTM implements IRestWrapperNTSTM
begin
Error('Post was called with RequestUri: %1', RequestUri);
end;

procedure SetDefaultRequestHeader(Name: Text; Value: Text)
begin

end;
}
6 changes: 3 additions & 3 deletions MSDyn365BC.Ntfy.Test/tests/TestSendNotifications.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ codeunit 50004 "TestSendNotifications"
begin
NtfyEvent.Init();
// NtfyEvent.NtfyMessage := 'Hello World'; //fixme
NtfyEvent.NtfyTopic := 'Hello World';
NtfyEvent.Topic := 'Hello World';
NtfyEvent.EventType := NtfyEvent.EventType::DummyNtfyType;
if not NtfyEvent.Insert() then;
NtfyEvent.SendNotifications(DummyNtfyType, NtfyEvent.EventType::DummyNtfyType, Params, RunBatchWrapperEmpty);
Expand All @@ -36,12 +36,12 @@ codeunit 50004 "TestSendNotifications"
begin
NtfyEvent.Init();
// NtfyEvent.NtfyMessage := 'true'; //fixme
NtfyEvent.NtfyTopic := 'true';
NtfyEvent.Topic := 'true';
NtfyEvent.EventType := NtfyEvent.EventType::DummyNtfyType;
if not NtfyEvent.Insert() then;
NtfyEvent.Init();
// NtfyEvent.NtfyMessage := 'false'; //fixme
NtfyEvent.NtfyTopic := 'false';
NtfyEvent.Topic := 'false';
NtfyEvent.EventType := NtfyEvent.EventType::DummyNtfyType;
if not NtfyEvent.Insert() then;

Expand Down

0 comments on commit f5ea3be

Please sign in to comment.