jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Lepekhine" <pa...@mail.ru>
Subject RE:Testing EJB dont work - because of local interfaces?
Date Fri, 16 Aug 2002 09:11:27 GMT
I am doing the same and my tests works!
Here is a piece of my code:
        protected void setUp() {
        try {
            InitialContext ctx = new InitialContext();
            home = (CategoryLocalHome)ctx.lookup(CategoryLocalHome.JNDI_NAME);
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(" got exception "+e.getMessage());
            assertEquals("no errors", e.getMessage());
        }
        }
        
    /**
        * Test create()
        */
    public void beginCreateCategory(WebRequest request) {
        doAuthentication(request, "analyst", "analyst");
    }

    public void testCreateCategory() {
        try {
            CategoryModel model = new CategoryModel("New category");
            model.setParentId("/");
            CategoryLocal cat = home.create(model);
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(" got exception "+e.getMessage());
            assertEquals("no errors", e.getMessage());
        }
    }

Is it the same as yours? It works.
Alexander


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message