Package cz.cvut.fel.restauracefel.hibernate

Examples of cz.cvut.fel.restauracefel.hibernate.User


     * Test of run method, of class SmenyController.
     */
    @Test
    public void testRun() {
        System.out.println("run");
        User user = new User();
        String[] rights = new String[]{"Zápis","Mazání"};
        smenyController.run(user, rights);
        boolean expResult = true;
        boolean result = smenyController.user.equals(user) && smenyController.prava.equals(rights);
        assertEquals(expResult, result);                      
View Full Code Here


    private boolean hasRightByUsername(String username, String requestedRight) throws RemoteException, FileNotFoundException, FileNotFoundException, NotBoundException {

        String[] rights = null;

        User user = CommonServiceFacade.getInstance().getUserByUsername(username);
        rights = CommonServiceFacade.getInstance().getRightsByUser(user.getUserId());

        for (int i = 0; i < rights.length; i++) {
            if (rights[i].equals(requestedRight)) {
                return true;
            }
View Full Code Here

                try {

                    //MainFrame mainFrame = new MainFrame(ServiceFacade.getInstance().getUserById(1), null);
                    String[] rights = new String[]{"Tvorba nového typu směny", "Tvorba nového templatu",
                        "Tvorba plánu směn","Přehled směn - vedoucí","Přehled směn zaměstnanec"};
                    SmenyController.getInstance().run(new User(), rights);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                // mainFrame.setCursor(invisible);
            }
View Full Code Here

TOP

Related Classes of cz.cvut.fel.restauracefel.hibernate.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.