Update dependencies and improve build process (#15)

This commit is contained in:
Mikołaj Pich
2017-08-10 12:59:13 +02:00
committed by GitHub
parent 0ea13cdadd
commit 344ba537fd
8 changed files with 127 additions and 62 deletions

View File

@ -6,7 +6,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import java.util.ArrayList;
import java.util.List;
@ -25,17 +24,15 @@ public class StudentAndParentTest {
Document gradesPageDocument = Jsoup.parse(input);
snp = Mockito.mock(StudentAndParent.class);
PowerMockito.whenNew(StudentAndParent.class)
.withArguments(Mockito.any(Cookies.class), Mockito.anyString()).thenReturn(snp);
Mockito.when(snp.getSnPPageDocument(Mockito.anyString())).thenReturn(gradesPageDocument);
Mockito.when(snp.getCalculatedID(Mockito.anyString())).thenCallRealMethod();
Mockito.when(snp.getLocationID()).thenReturn("symbol");
Mockito.when(snp.getID()).thenReturn("123456");
Mockito.when(snp.getSemesters()).thenCallRealMethod();
Mockito.when(snp.getGradesPageUrl()).thenReturn("http://wulkanowy.null");
Mockito.when(snp.getSemesters(Mockito.any(Document.class))).thenCallRealMethod();
Mockito.when(snp.getCurrentSemester(Mockito.anyListOf(Semester.class)))
.thenCallRealMethod();
Mockito.when(snp.getCurrentSemester(Mockito.<Semester>anyList())).thenCallRealMethod();
}
@Test

View File

@ -20,7 +20,7 @@ public class GradesTest {
Mockito.when(snp.getSnPPageDocument(Mockito.anyString()))
.thenReturn(gradesPageDocument);
Mockito.when(snp.getSemesters(Mockito.any(Document.class))).thenCallRealMethod();
Mockito.when(snp.getCurrentSemester(Mockito.anyListOf(Semester.class)))
Mockito.when(snp.getCurrentSemester(Mockito.<Semester>anyList()))
.thenCallRealMethod();
}
}