Skip to content

Commit

Permalink
Rollback tests version, update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuznik committed Nov 28, 2024
1 parent c5898d1 commit 16572a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ jobs:
- name: Build and Run Tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
RISK_THRESHOLD: 0.5
run: mvn clean install
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import pl.ateam.disasteralerts.disasteralert.DisasterType;
import pl.ateam.disasteralerts.disasteralert.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.util.CitiesInPoland;
Expand All @@ -20,19 +17,20 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;

@SpringJUnitConfig(classes = {OpenAIClient.class, RiskAssessmentService.class})
@ExtendWith(MockitoExtension.class)
class RiskAssessmentServiceTest {

@Autowired
private RiskAssessmentService riskAssessmentService;

@MockBean
private OpenAIClient openAIClient;

public static final String FLOOD_DESCRIPTION = "Duża powódź";
public static final String FIRE_DESCRIPTION = "Ognisko palone przez turystów nad rzeką";
public static final Double PROBABILITY_OF_RISK_HIGH = 0.8;
public static final Double PROBABILITY_OF_RISK_LOW = 0.3;

@Mock
private OpenAIClient openAIClient;

@InjectMocks
private RiskAssessmentService riskAssessmentService;

private final List<String> citiesInPoland = CitiesInPoland.getList();

@Test
Expand Down

0 comments on commit 16572a2

Please sign in to comment.