Commit e3d785555bd54c9b4dc776d93b0ac694e4d124a1

Authored by Emerson Oliveira
1 parent 1fc8ef65
Exists in master

IN PROGRESS - issue FWK-120: Testes da extensão JSF (segurança +

mensagem + exceção) 
https://demoiselle.atlassian.net/browse/FWK-120
Refatoração
impl/extension/jsf/src/test/java/exception/handler/authentication/AuthenticationExceptionTest.java
... ... @@ -59,7 +59,7 @@ public class AuthenticationExceptionTest {
59 59 @ArquillianResource
60 60 private URL deploymentUrl;
61 61  
62   - private static final String PATH = "src/test/resources/security-authentication";
  62 + private static final String PATH = "src/test/resources/exception-handler-authentication";
63 63  
64 64 @Deployment(testable = false)
65 65 public static WebArchive createDeployment() {
... ...
impl/extension/jsf/src/test/resources/exception-handler-authentication/index.xhtml 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<html xmlns:h="http://java.sun.com/jsf/html"
  2 + xmlns:ui="http://java.sun.com/jsf/facelets">
  3 +
  4 + <h:body>
  5 + #{authenticationBean.msg}
  6 + </h:body>
  7 +
  8 +</html>
... ...
impl/extension/jsf/src/test/resources/exception-handler-authentication/login.xhtml 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<html xmlns:h="http://java.sun.com/jsf/html"
  2 + xmlns:ui="http://java.sun.com/jsf/facelets">
  3 +
  4 + <h:message />
  5 + <h:body>
  6 + Called the page /login
  7 + </h:body>
  8 +
  9 +</html>
0 10 \ No newline at end of file
... ...
impl/extension/jsf/src/test/resources/exception-handler-authentication/web.xml 0 → 100644
... ... @@ -0,0 +1,61 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses />
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  38 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  39 +
  40 + <listener>
  41 + <listener-class>br.gov.frameworkdemoiselle.util.ServletListener</listener-class>
  42 + </listener>
  43 + <filter>
  44 + <filter-name>Demoiselle Servlet Filter</filter-name>
  45 + <filter-class>br.gov.frameworkdemoiselle.util.ServletFilter</filter-class>
  46 + </filter>
  47 + <filter-mapping>
  48 + <filter-name>Demoiselle Servlet Filter</filter-name>
  49 + <url-pattern>/*</url-pattern>
  50 + </filter-mapping>
  51 +
  52 + <servlet>
  53 + <servlet-name>Faces Servlet</servlet-name>
  54 + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  55 + <load-on-startup>1</load-on-startup>
  56 + </servlet>
  57 + <servlet-mapping>
  58 + <servlet-name>Faces Servlet</servlet-name>
  59 + <url-pattern>*.jsf</url-pattern>
  60 + </servlet-mapping>
  61 +</web-app>
0 62 \ No newline at end of file
... ...
impl/extension/jsf/src/test/resources/security-authentication/index.xhtml
... ... @@ -1,8 +0,0 @@
1   -<html xmlns:h="http://java.sun.com/jsf/html"
2   - xmlns:ui="http://java.sun.com/jsf/facelets">
3   -
4   - <h:body>
5   - #{authenticationBean.msg}
6   - </h:body>
7   -
8   -</html>
impl/extension/jsf/src/test/resources/security-authentication/login.xhtml
... ... @@ -1,9 +0,0 @@
1   -<html xmlns:h="http://java.sun.com/jsf/html"
2   - xmlns:ui="http://java.sun.com/jsf/facelets">
3   -
4   - <h:message />
5   - <h:body>
6   - Called the page /login
7   - </h:body>
8   -
9   -</html>
10 0 \ No newline at end of file
impl/extension/jsf/src/test/resources/security-authentication/web.xml
... ... @@ -1,61 +0,0 @@
1   -<!--
2   - Demoiselle Framework
3   - Copyright (C) 2010 SERPRO
4   - ============================================================================
5   - This file is part of Demoiselle Framework.
6   -
7   - Demoiselle Framework is free software; you can redistribute it and/or
8   - modify it under the terms of the GNU Lesser General Public License version 3
9   - as published by the Free Software Foundation.
10   -
11   - This program is distributed in the hope that it will be useful,
12   - but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - GNU General Public License for more details.
15   -
16   - You should have received a copy of the GNU Lesser General Public License version 3
17   - along with this program; if not, see <http://www.gnu.org/licenses />
18   - or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - Fifth Floor, Boston, MA 02110-1301, USA.
20   - ============================================================================
21   - Este arquivo é parte do Framework Demoiselle.
22   -
23   - O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - do Software Livre (FSF).
26   -
27   - Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - para maiores detalhes.
31   -
32   - Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
34   - ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   --->
37   -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
38   - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
39   -
40   - <listener>
41   - <listener-class>br.gov.frameworkdemoiselle.util.ServletListener</listener-class>
42   - </listener>
43   - <filter>
44   - <filter-name>Demoiselle Servlet Filter</filter-name>
45   - <filter-class>br.gov.frameworkdemoiselle.util.ServletFilter</filter-class>
46   - </filter>
47   - <filter-mapping>
48   - <filter-name>Demoiselle Servlet Filter</filter-name>
49   - <url-pattern>/*</url-pattern>
50   - </filter-mapping>
51   -
52   - <servlet>
53   - <servlet-name>Faces Servlet</servlet-name>
54   - <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
55   - <load-on-startup>1</load-on-startup>
56   - </servlet>
57   - <servlet-mapping>
58   - <servlet-name>Faces Servlet</servlet-name>
59   - <url-pattern>*.jsf</url-pattern>
60   - </servlet-mapping>
61   -</web-app>
62 0 \ No newline at end of file