Skip to content

Commit

Permalink
#46 REFAKTORIRANJE: Sada se "lažni" GPTRequestSender prenosi u konstrukt
Browse files Browse the repository at this point in the history
...u konstruktoru testne klase.
  • Loading branch information
dmatijani committed Jun 15, 2024
1 parent 407d0c0 commit 16ecaf8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ namespace UnitTesting.Nove_funkcionalnosti.F16
public class GPTService_unitTest
{
private GPTService gptService { get; set; }
private IGPTRequestSender gptRequestSender { get; set; }

public GPTService_unitTest()
{
gptService = new GPTService(null);
gptRequestSender = A.Fake<IGPTRequestSender>();
gptService = new GPTService(gptRequestSender);
}

[Fact]
Expand Down Expand Up @@ -59,9 +61,6 @@ public void GPTService_SendSystemMessage_ShouldBeAbleToSend()
[Fact]
public void GPTService_PassGPTRequestSender_ShouldWork()
{
//Arrange
IGPTRequestSender gptRequestSender = A.Fake<IGPTRequestSender>();

//Act
gptService = new GPTService(gptRequestSender);

Expand Down

0 comments on commit 16ecaf8

Please sign in to comment.