Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Main
TextFormattingRules
WhatIsWiki




JSPWiki v2.2.33

[RSS]


Hide Menu

SandBox


This is version 262. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]



    public static Test suite() {
        return new TestSetup(new TestSuite(UserDaoTest.class)) {
                public void setUp() throws Exception {
                    start();
                    dao = (UserDAOctx.getBean("userDAO");
                }

                public void tearDown() throws Exception {
                    stop();
                    dao = null;
                }
            };
    }


    protected static void start() throws Exception {
        String[] paths = {"/WEB-INF/applicationContext*.xml",
                          "/org/appfuse/dao/applicationContext-test.xml"};
        ctx = new ClassPathXmlApplicationContext(paths);
    
        DataSource ds = (DataSourcectx.getBean("dataSource");
        conn = new DatabaseConnection(ds.getConnection());
        dataSet = new XmlDataSet(new FileInputStream("test/data/sample-data.xml"));
        // clear table and insert only sample data
        DatabaseOperation.CLEAN_INSERT.execute(conn, dataSet);
    }


Attachments:


Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:36 MST by MattRaible.