@@ -0,0 +1,2421 @@
+/**%0A * Project Distributed Transactions.%0A * Copyright Micha%C5%82 Szczygie%C5%82, 2013.%0A * Created at Dec 29, 2013.%0A */%0Apackage com.m4gik.busisess;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.sql.Timestamp;%0A%0Aimport org.junit.Test;%0Aimport org.springframework.transaction.annotation.Transactional;%0A%0A/**%0A * %0A * Class testing the data source during transaction.%0A * %0A * @author m4gik %3Cmichal.szczygiel@wp.pl%3E%0A * %0A */%0Apublic class DataSourceTests extends BaseDataSourceTest %7B%0A%0A    @Transactional%0A    @Test%0A    public void testFinanceDataSource() throws Exception %7B%0A        getJdbcFinance()%0A                .update(%22INSERT INTO REGISTER (id, name, register_date, price) VALUES (?,?,?,?)%22,%0A                        0, %22stuff%22, (new Timestamp(0)), 16.0);%0A        assertEquals(1,%0A                getJdbcFinance().queryForInt(%22SELECT COUNT(*) FROM REGISTER%22));%0A%0A        getJdbcFinance().getJdbcOperations().execute(%22DELETE FROM REGISTER%22);%0A        assertEquals(0,%0A                getJdbcFinance().queryForInt(%22SELECT COUNT(*) FROM REGISTER%22));%0A    %7D%0A%0A    @Transactional%0A    @Test%0A    public void testWarehouseFinland() throws Exception %7B%0A        getJdbcWarehouseFinland()%0A                .update(%22INSERT INTO DEPOT (id, name, depot_date, amount) VALUES (?,?,?,?)%22,%0A                        0, %22stuff%22, (new Timestamp(0)), 16.0);%0A        assertEquals(%0A                1,%0A                getJdbcWarehouseFinland().queryForInt(%0A                        %22SELECT COUNT(*) FROM DEPOT%22));%0A%0A        getJdbcWarehouseFinland().getJdbcOperations().execute(%0A                %22DELETE FROM DEPOT%22);%0A        assertEquals(%0A                0,%0A                getJdbcWarehouseFinland().queryForInt(%0A                        %22SELECT COUNT(*) FROM DEPOT%22));%0A    %7D%0A%0A    @Transactional%0A    @Test%0A    public void testWarehousePoland() throws Exception %7B%0A%0A        getJdbcWarehousePoland()%0A                .update(%22INSERT INTO DEPOT (id, name, depot_date, amount) VALUES (?,?,?,?)%22,%0A                        0, %22stuff%22, (new Timestamp(0)), 16.0);%0A        assertEquals(%0A                1,%0A                getJdbcWarehousePoland().queryForInt(%0A                        %22SELECT COUNT(*) FROM DEPOT%22));%0A%0A        getJdbcWarehousePoland().getJdbcOperations().execute(%0A                %22DELETE FROM DEPOT%22);%0A        assertEquals(%0A                0,%0A                getJdbcWarehousePoland().queryForInt(%0A                        %22SELECT COUNT(*) FROM DEPOT%22));%0A    %7D%0A%7D%0A

Add tests for the data source