Use codecov for code coverage (#25)

* Use codecov for code coverage

* Change codacy coverage badge with codecov

* Unify repo badges

* Update download link

* Update unit tests
This commit is contained in:
Mikołaj Pich
2017-09-18 18:15:33 +02:00
committed by Rafał Borcz
parent 690b730494
commit aae3d5d357
9 changed files with 38 additions and 35 deletions

View File

@ -10,7 +10,7 @@ import java.util.List;
import io.github.wulkanowy.dao.entities.Grade;
public class EntitiesCompareTest {
public class EntitiesCompareTest extends EntitiesCompare {
private List<Grade> newList = new ArrayList<>();

View File

@ -18,6 +18,7 @@ public class GradeTest {
Assert.assertEquals(R.color.one_grade, new Grade().setValue("1+").getValueColor());
Assert.assertEquals(R.color.one_grade, new Grade().setValue("+1").getValueColor());
Assert.assertEquals(R.color.default_grade, new Grade().setValue("Np").getValueColor());
Assert.assertEquals(R.color.default_grade, new Grade().setValue("7").getValueColor());
Assert.assertEquals(R.color.default_grade, new Grade().setValue("").getValueColor());
}
@ -31,5 +32,22 @@ public class GradeTest {
Assert.assertEquals(new Grade().setSubject("Religia").setValue("5").hashCode(),
new Grade().setSubject("Religia").setValue("5").hashCode());
Assert.assertFalse(new Grade().setSubject("Informatyka")
.equals(new FakeGrade().setSubject("Informatyka")));
Assert.assertFalse(new Grade().setSubject("Informatyka")
.equals(null));
}
private class FakeGrade {
private String subject;
private FakeGrade setSubject(String subject) {
this.subject = subject;
this.subject = this.subject + subject;
return this;
}
}
}