Skip to content

Commit

Permalink
Modified tests location
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Mario committed Apr 27, 2024
1 parent ffd5815 commit a4b6160
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,4 @@ jobs:
wget https://raw.githubusercontent.com/arquisoft/wiq_en1b/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_en1b/master/.env
docker compose down
docker compose --profile prod up -d
docker compose --profile prod up -d --pull always
11 changes: 6 additions & 5 deletions questionGenerator/src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main.java;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import main.java.questionGenerator.QuestionGenerator;
Expand Down Expand Up @@ -44,18 +45,18 @@ private static List<Question> generate() {
List<Question> questions = new ArrayList<Question>();
for(String lang : languages) {
qg.setLanguageCode(lang);
for(QuestionType type: types)
for(QuestionType type: types){
System.out.println(String.format("Starting Type: %s Language: %s at: %s", type, lang, new Date()));
questions.addAll(run(qg, type, NUMBER_OF_QUESTIONS));
System.out.println(String.format("Type: %s Language: %s Finished", type, lang));
}

}
return questions;
}

private static List<Question> run(QuestionGenerator qg, QuestionType type, int numberOfQuestions) {
List<Question> questions = qg.generateQuestions(type, numberOfQuestions);
for(int i=0; i<questions.size(); i++) {
Question question = questions.get(i);
question.setNumber(i);
}
return questions;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import main.java.questionGenerator.question.QuestionType;
import main.java.questionGenerator.repository.QuestionRepository;

public class StaticMain {
public class MainStatic {

public static void main(String[] args) {
QuestionGenerator qg = QuestionGenerator.getInstance();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator;
package tests.java.questionGenerator;


import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -22,7 +22,8 @@ public class QuestionGeneratorTests {

private QuestionGenerator qg = QuestionGenerator.getInstance();

private static QuestionType[] types = {QuestionType.POPULATION, QuestionType.CAPITAL, QuestionType.SIZE, QuestionType.LANGUAGE};
private static QuestionType[] types = {QuestionType.POPULATION, QuestionType.CAPITAL, QuestionType.POPULATION,
QuestionType.SIZE, QuestionType.HEAD_OF_GOVERMENT};

@Test
void testGenerateQuestionsEnglish() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.generator;
package tests.java.questionGenerator.generator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.questionGenerator.question;
package tests.java.questionGenerator.question;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
Expand Down
2 changes: 0 additions & 2 deletions webapp/src/components/GameConfigurator/GameConfigurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ function GameConfigurator(){
/>
<br></br>
<ButtonCustomized t={t} handleClick={handleClick}/>
<br></br>
<hr className="hr-style"></hr>
<br></br>
<h2>{t("gameConfigurator.competi_game")}</h2>
<p>{t("gameConfigurator.rules_competi")}</p>
{/* Botones para jugar un juego personalizado o competitivo */}
Expand Down

0 comments on commit a4b6160

Please sign in to comment.