public void mustRenderRequestSubmittedWindow() { USSDApplication app = getTestApp1(); USSDRequest request = app.newRequest("1234"); fillRequest(request); USSDResponse response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("operations", response.getWindow().getId()); Assert.AreEqual(ResponseType.FORM, response.getResponseType()); request = app.newRequest("1"); fillRequest(request); response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("transfers", response.getWindow().getId()); Assert.AreEqual(ResponseType.FORM, response.getResponseType()); request = app.newRequest("2"); fillRequest(request); response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("amountWindow", response.getWindow().getId()); Assert.AreEqual(ResponseType.FORM, response.getResponseType()); request = app.newRequest("1000"); fillRequest(request); response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("requestSubmitted", response.getWindow().getId()); Assert.AreEqual(ResponseType.MESSAGE, response.getResponseType()); }
protected void delegateRequest(USSDRequest request, USSDSession <Object> session, USSDResponse response) { USSDResponse ussdResponse = BantU.executeRequest(application, request, session); response.setWindow(ussdResponse.getWindow()); response.setResponseType(ussdResponse.getResponseType()); response.setSession(ussdResponse.getSession()); }
public void mustRenderOperationsWindow() { USSDRequest request = getTestApp1().newRequest("1234"); fillRequest(request); USSDResponse response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("operations", response.getWindow().getId()); Assert.AreEqual(ResponseType.FORM, response.getResponseType()); }
public void mustRenderLoginWindow() { USSDRequest request = getTestApp1().newRequest(TEST_BASE_CODE); fillRequest(request); USSDResponse response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("login", response.getWindow().getId()); Assert.AreEqual(ResponseType.FORM, response.getResponseType()); }
public void mustRenderPasswordRecoverWindow() { USSDRequest request = getTestApp1().newRequest("1111"); fillRequest(request); USSDApplication app = getTestApp1(); USSDResponse response = BantU.executeRequest(getTestApp1(), request); Assert.AreEqual("recoverPassowrd", response.getWindow().getId()); Assert.AreEqual(ResponseType.MESSAGE, response.getResponseType()); }