Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
        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());
        }
Esempio n. 5
0
        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());
        }