diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..a827e30
Binary files /dev/null and b/.DS_Store differ
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/lab-java-intro-to-testing.iml b/.idea/lab-java-intro-to-testing.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/lab-java-intro-to-testing.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..6f29fee
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..ab88969
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/.gitignore b/solution/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/solution/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/solution/.idea/.gitignore b/solution/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/solution/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/solution/.idea/encodings.xml b/solution/.idea/encodings.xml
new file mode 100644
index 0000000..aa00ffa
--- /dev/null
+++ b/solution/.idea/encodings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/.idea/misc.xml b/solution/.idea/misc.xml
new file mode 100644
index 0000000..45028cd
--- /dev/null
+++ b/solution/.idea/misc.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/.idea/uiDesigner.xml b/solution/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/solution/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/pom.xml b/solution/pom.xml
new file mode 100644
index 0000000..3190d48
--- /dev/null
+++ b/solution/pom.xml
@@ -0,0 +1,32 @@
+
+
+ 4.0.0
+
+ ironhack.com
+ introTesting
+ 1.0-SNAPSHOT
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ 5.10.0
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter
+ RELEASE
+ test
+
+
+
+
\ No newline at end of file
diff --git a/solution/src/main/java/ex1/lab.java b/solution/src/main/java/ex1/lab.java
new file mode 100644
index 0000000..15a9539
--- /dev/null
+++ b/solution/src/main/java/ex1/lab.java
@@ -0,0 +1,17 @@
+package ex1;
+
+import java.util.ArrayList;
+
+public class lab {
+
+ public static ArrayList ar(int n){
+ ArrayList numers = new ArrayList<>(n);
+
+ for (int i = 0; i keywords = new ArrayList();
+ keywords.add("abstract");
+ keywords.add("boolean");
+ keywords.add("break");
+ keywords.add("byte");
+ keywords.add("cas");
+ keywords.add("cath");
+ keywords.add("char");
+ keywords.add("continue");
+ keywords.add("default");
+ keywords.add("do");
+ keywords.add("double");
+ keywords.add("else");
+
+ for (String i : words.split("\\s+")){
+ for (String x : keywords){
+ if (i.equals(x)){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/solution/src/main/java/ex3/PlayerClass.java b/solution/src/main/java/ex3/PlayerClass.java
new file mode 100644
index 0000000..314be0f
--- /dev/null
+++ b/solution/src/main/java/ex3/PlayerClass.java
@@ -0,0 +1,98 @@
+package ex3;
+
+
+abstract class Player{
+ private int health;
+ private int strenght;
+ private int lives;
+
+ public Player(int health, int strenght, int lives){
+ this.health = 100;
+ setStrenght(strenght);
+ setLives(lives);
+ }
+
+ public int getHealth() {
+ return health;
+ }
+
+ public void setHealth(int health) {
+ this.health = health;
+ }
+
+ public int getStrenght() {
+ return strenght;
+ }
+
+ public void setStrenght(int strenght) {
+ this.strenght = strenght;
+ }
+
+ public int getLives() {
+ return lives;
+ }
+
+ public void setLives(int lives) {
+ this.lives = lives;
+ }
+
+ public void decrementLive(){
+ lives -= 1;
+ health = 100;
+ }
+
+ public void attack(Player playerToAttack){
+ playerToAttack.health -= strenght;
+ }
+
+ public boolean checkHealth(){
+ if (getHealth() == 0){
+ decrementLive();
+ }
+ return false;
+ }
+
+}
+
+
+class Elf extends Player{
+ private int speed;
+ public Elf(int health, int strength, int lives){
+ super(health, strength, lives);
+ setSpeed(speed);
+ }
+
+ public int getSpeed() {
+ return speed;
+ }
+
+ public void setSpeed(int speed) {
+ this.speed = speed;
+ }
+}
+
+class Warrior extends Player{
+ public Warrior(int health, int strength, int lives){
+ super(health, strength, lives);
+ }
+
+ public Elf convertToElf(int speed){
+ Elf elf = new Elf(getHealth(), getStrenght(), getLives());
+ elf.setSpeed(speed);
+ return elf;
+ }
+}
+
+class Wizard extends Player{
+ public Wizard(int health, int strength, int lives){
+ super(health, strength, lives);
+ }
+
+ public Elf spell(int speed){
+ Elf elf = new Elf(getHealth(), getStrenght(), getLives());
+ elf.setSpeed(speed);
+ return elf;
+ }
+}
+
+
diff --git a/solution/src/test/java/ex1/labTest.java b/solution/src/test/java/ex1/labTest.java
new file mode 100644
index 0000000..8f98ce0
--- /dev/null
+++ b/solution/src/test/java/ex1/labTest.java
@@ -0,0 +1,20 @@
+package ex1;
+import java.util.ArrayList;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class labTest {
+
+ @Test
+ void labTesting() {
+ ArrayList result = new ArrayList<>();
+ result.add(0);
+ result.add(2);
+ result.add(4);
+
+ assertEquals(lab.ar(5), result);
+ }
+}
+
+
diff --git a/solution/src/test/java/ex2/keywordsTest.java b/solution/src/test/java/ex2/keywordsTest.java
new file mode 100644
index 0000000..539c0ef
--- /dev/null
+++ b/solution/src/test/java/ex2/keywordsTest.java
@@ -0,0 +1,48 @@
+package ex2;
+import java.util.ArrayList;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+
+
+public class keywordsTest {
+
+ private final static ArrayList keywords = new ArrayList();
+
+ @BeforeAll
+ static void init(){
+
+ keywords.add("abstract");
+ keywords.add("boolean");
+ keywords.add("break");
+ keywords.add("byte");
+ keywords.add("cas");
+ keywords.add("cath");
+ keywords.add("char");
+ keywords.add("continue");
+ keywords.add("default");
+ keywords.add("do");
+ keywords.add("double");
+ keywords.add("else");
+ }
+
+ private boolean check(String words){
+ for (String i : words.split("\\s+")){
+ for (String x : keywords){
+ if (i.equals(x)){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Test
+ void keyCheck(){
+ assertTrue(check("I do my homework"), String.valueOf(true));
+ assertFalse(check("I don“t my homework"), String.valueOf(true));
+ }
+
+
+}
diff --git a/solution/src/test/java/ex3/PlayerClassTest.java b/solution/src/test/java/ex3/PlayerClassTest.java
new file mode 100644
index 0000000..736707d
--- /dev/null
+++ b/solution/src/test/java/ex3/PlayerClassTest.java
@@ -0,0 +1,117 @@
+package ex3;
+
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+public class PlayerClassTest {
+ @BeforeEach
+ void setPlayer() {
+ }
+
+ abstract class Player {
+ private int health;
+ private int strenght;
+ private int lives;
+
+ public Player(int health, int strenght, int lives) {
+ this.health = 100;
+ setStrenght(strenght);
+ setLives(lives);
+ }
+
+ public int getHealth() {
+ return health;
+ }
+
+ public void setHealth(int health) {
+ this.health = health;
+ }
+
+ public int getStrenght() {
+ return strenght;
+ }
+
+ public void setStrenght(int strenght) {
+ this.strenght = strenght;
+ }
+
+ public int getLives() {
+ return lives;
+ }
+
+ public void setLives(int lives) {
+ this.lives = lives;
+ }
+
+ public void decrementLive() {
+ lives -= 1;
+ health = 100;
+ }
+
+ public void attack(Player playerToAttack) {
+ playerToAttack.health -= strenght;
+ }
+
+ public boolean checkHealth() {
+ if (getHealth() == 0) {
+ decrementLive();
+ }
+ return false;
+ }
+
+ }
+
+ @Test
+ void createElf() {
+ class Elf extends Player {
+ private int speed;
+
+ public Elf(int health, int strength, int lives) {
+ super(health, strength, lives);
+ setSpeed(speed);
+ }
+
+ public int getSpeed() {
+ return speed;
+ }
+
+ public void setSpeed(int speed) {
+ this.speed = speed;
+ }
+ }
+ }
+
+ @Test
+ void createWarrior(){
+ class Warrior extends ex3.Player {
+ public Warrior(int health, int strength, int lives) {
+ super(health, strength, lives);
+ }
+
+ public ex3.Elf convertToElf(int speed) {
+ ex3.Elf elf = new ex3.Elf(getHealth(), getStrenght(), getLives());
+ elf.setSpeed(speed);
+ return elf;
+ }
+ }
+ }
+
+ @Test
+ void createWizard() {
+ class Wizard extends ex3.Player {
+ public Wizard(int health, int strength, int lives) {
+ super(health, strength, lives);
+ }
+
+ public ex3.Elf spell(int speed) {
+ ex3.Elf elf = new ex3.Elf(getHealth(), getStrenght(), getLives());
+ elf.setSpeed(speed);
+ return elf;
+ }
+ }
+ }
+}
+
+
+