Browse Source

First assertJ Test and Jenkins configuration testing

feature-dev-rp_prev
Jan Ortner 3 years ago
parent
commit
54a5b1e75c
  1. 10
      src/main/java/Dog.java
  2. 2
      src/main/java/Test.java
  3. 15
      src/test/java/DogTest.java
  4. 5
      src/test/java/TestTest.java

10
src/main/java/Dog.java

@ -0,0 +1,10 @@
public class Dog {
private String name;
private Float weight;
public Dog(String name, double weight) {
}
}

2
src/main/java/Test.java

@ -1,2 +0,0 @@
public class Test {
}

15
src/test/java/DogTest.java

@ -0,0 +1,15 @@
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
class DogTest {
Dog fido = new Dog("Fido", 5.25);
Dog fidosClone = new Dog("Fido", 5.25);
@Test
void test() {
assertThat(fido).isEqualToComparingFieldByFieldRecursively(fidosClone);
}
}

5
src/test/java/TestTest.java

@ -1,5 +0,0 @@
import static org.junit.jupiter.api.Assertions.*;
class TestTest {
}
Loading…
Cancel
Save