Package org.drools.repository

Examples of org.drools.repository.RulesRepository.logout()


        assertEquals( ver + 1,
                      ass.getVersionNumber() );
        assertEquals( "hey ho",
                      ass.getCheckinComment() );

        repo.logout();

        Lifecycle.endApplication();
    }

    @Test
View Full Code Here


                      res.extractContent() );

        pkg = repo.loadPackage( "testDeleteRestServlet" );
        assertFalse( pkg.listAssetsByFormat( new String[]{"drl"} ).hasNext() );

        repo.logout();

        Lifecycle.endApplication();
    }

}
View Full Code Here

        MockHTTPResponse res = new MockHTTPResponse();
        serv.doPost( req,
                     res );
        assertEquals( 200,
                      res.status );
        repo.logout();
    }

    @Test
    public void testSnapshotCreation() throws Exception {
        final String dynamicPackage = "test-snap" + UUID.randomUUID();
View Full Code Here

        MockHTTPResponse res = new MockHTTPResponse();
        serv.doPost( req,
                     res );
        assertEquals( 200,
                      res.status );
        repo.logout();
    }

}
View Full Code Here

        String out = new String( ass2.getBinaryContentAsBytes() );
        assertEquals( "more content",
                      out );

        repo.logout();

        Lifecycle.endApplication();
    }

    @Test
View Full Code Here

                                              "" );
        DroolsHeader.updateDroolsHeader( "import java.util.List",
                                                  pkg );
        pkg.updateCompiledPackage( new ByteArrayInputStream( "foo".getBytes() ) );
        pkg.checkin( "" );
        repo.logout();

        int iterations = 0;

        int maxIteration = 250; //pick a large number to do a stress test
        while ( iterations < maxIteration ) {
View Full Code Here

        RulesRepository repo = impl.getRulesRepository();

        PackageItem pkg = repo.loadPackage( nm );
        pkg.updateDescription( System.currentTimeMillis() + "" );
        pkg.checkin( "a change" );
        repo.logout();

    }

    private List<AssetItem> iteratorToList(Iterator<AssetItem> assets) {
        List<AssetItem> list = new ArrayList<AssetItem>();
View Full Code Here

        }
       
        assertEquals(2, kp.getRules().size());

        server.stop();
        repo.logout();

  }

  public void testScenariosAndChangeSet() throws Exception {
    RulesRepository repo = new RulesRepository( TestEnvironmentSessionHelper.getSession( true ) );
View Full Code Here


    String out = new String(ass2.getBinaryContentAsBytes());
    assertEquals("more content", out);

        repo.logout();

  }

  public void testPut() throws Exception {
View Full Code Here

    ass = pkg.loadAsset("asset1");
    assertEquals("some new content", ass.getContent());
    assertEquals(ver + 1, ass.getVersionNumber());
    assertEquals("hey ho", ass.getCheckinComment());

        repo.logout();
  }


  public void testDelete() throws Exception {
    RulesRepository repo = new RulesRepository( TestEnvironmentSessionHelper.getSession() );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.