really fix TouchPointTest
@@ -6,7 +6,7 @@ import org.junit.Test;
import java.io.IOException;
import de.geeksfactory.opacclient.objects.Account;
-import okhttp3.FormBody;
+import okhttp3.RequestBody;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -29,7 +29,8 @@ public class TouchPointTest extends BaseHtmlTest {
account = new Account();
account.setName("username");
- account.setName("password");
+ account.setPassword("password");
+ touchPoint.CSId = "1234";
}
@Test
@@ -38,7 +39,7 @@ public class TouchPointTest extends BaseHtmlTest {
.when(touchPoint).httpGet(eq(touchPoint.opac_url + "/login.do"), anyString());
doReturn(readResource("/touchpoint/login/errorMessage.html"))
.when(touchPoint)
- .httpPost(eq(touchPoint.opac_url + "/login.do"), any(FormBody.class),
+ .httpPost(eq(touchPoint.opac_url + "/login.do"), any(RequestBody.class),
anyString());
try {
@@ -59,7 +60,7 @@ public class TouchPointTest extends BaseHtmlTest {
.when(touchPoint).httpGet(eq(touchPoint.opac_url + "/login.do"), anyString());
doReturn(readResource("/touchpoint/login/loggedIn.html"))
.when(touchPoint)
- .httpPost(eq(touchPoint.opac_url + "/login.do"), any(FormBody.class),
+ .httpPost(eq(touchPoint.opac_url + "/login.do"), any(RequestBody.class),
anyString());
@@ -74,7 +75,7 @@ public class TouchPointTest extends BaseHtmlTest {
.when(touchPoint).httpGet(eq(touchPoint.opac_url + "/login.do"), anyString());
doReturn(readResource("/touchpoint/login/alertMessage.html"))
.when(touchPoint)
- .httpPost(eq(touchPoint.opac_url + "/login.do"), any(FormBody.class),
+ .httpPost(eq(touchPoint.opac_url + "/login.do"), any(RequestBody.class),
anyString());
doReturn(readResource("/touchpoint/login/loggedIn.html"))
.when(touchPoint)
@@ -92,7 +93,7 @@ public class TouchPointTest extends BaseHtmlTest {
.when(touchPoint).httpGet(eq(touchPoint.opac_url + "/login.do"), anyString());
doReturn(readResource("/touchpoint/login/warningMessage.html"))
.when(touchPoint)
- .httpPost(eq(touchPoint.opac_url + "/login.do"), any(FormBody.class),
+ .httpPost(eq(touchPoint.opac_url + "/login.do"), any(RequestBody.class),
anyString());
doReturn(readResource("/touchpoint/login/loggedIn.html"))
.when(touchPoint)
