Package org.drools.scm.svn.SvnActionFactory

Examples of org.drools.scm.svn.SvnActionFactory.AddDirectory


                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        try {
            ScmAction addDirectory = new AddDirectory( "folder1",
                                                    "folder1_1" );
            actions.addScmAction( addDirectory );
            svn.execute( actions,
                         "test message" );
            fail( "This should fail as 'folder1' has not yet been created" );
View Full Code Here


        CompositeScmAction actions = new CompositeScmAction();

        // Correctly add a new directory at root
        actions = new CompositeScmAction();
        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );

        svn.execute( actions,
                     "test message" );

        // Check we can't add duplicate Directorys
        try {
            actions = new CompositeScmAction();
            addDirectory = new AddDirectory( "",
                                          "folder1" );
            actions.addScmAction( addDirectory );
            svn.execute( actions,
                         "test message" );
            fail( "This should fail as 'folder1' already exists" );
View Full Code Here

        CompositeScmAction actions = new CompositeScmAction();

        // Correctly add a new Directory at root
        actions = new CompositeScmAction();
        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );

        svn.execute( actions,
                     "test message" );

        // Now check various flat and deep Directory creations
        actions = new CompositeScmAction();

        addDirectory = new AddDirectory( "folder1",
                                      "folder1_1" );
        actions.addScmAction( addDirectory );

        addDirectory = new AddDirectory( "folder1/folder1_1",
                                      "folder1_1_1" );
        actions.addScmAction( addDirectory );

        addDirectory = new AddDirectory( "folder1",
                                      "folder1_2" );
        actions.addScmAction( addDirectory );

        addDirectory = new AddDirectory( "",
                                      "folder2/folder2_1" );
        actions.addScmAction( addDirectory );

        addDirectory = new AddDirectory( "",
                                      "folder3/folder3_1/folder3_1_1/folder3_1_1_1" );
        actions.addScmAction( addDirectory );

        svn.execute( actions,
                     "test message" );
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );

        ScmAction addFile = new AddFile( "folder1",
                                         "file1.dat",
                                         new byte[]{1, 1, 1, 1} );
        actions.addScmAction( addFile );

        addDirectory = new AddDirectory( "folder1",
                                      "folder1_1" );
        actions.addScmAction( addDirectory );

        addFile = new AddFile( "folder1/folder1_1",
                               "file1_1.dat",
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );

        byte[] oldContent = new byte[]{1, 1, 1, 1};
        byte[] newContent = new byte[]{1, 0, 1, 0};
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );
        byte[] content = new byte[]{1, 1, 1, 1};
        ScmAction addFile = new AddFile( "folder1",
                                         "file1.dat",
                                         content );
        actions.addScmAction( addFile );
        svn.execute( actions,
                     "test message" );

        // Check the contents are correct
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        svn.getContent( "folder1",
                        "file1.dat",
                        -1,
                        baos );
        assertTrue( Arrays.equals( content,
                                   baos.toByteArray() ) );

        List list = convertToStringList( svn.listEntries( "" ) );
        assertTrue( list.contains( "folder1" ) );
        assertTrue( list.contains( "folder1/file1.dat" ) );
        assertFalse( list.contains( "folder2/file2.dat" ) );

        // Now copy the file
        actions = new CompositeScmAction();
        addDirectory = new AddDirectory( "",
                                      "folder2" );
        actions.addScmAction( addDirectory );
        ScmAction copyFile = new CopyFile( "folder1",
                                           "file1.dat",
                                           "folder2",
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );
        byte[] content1 = new byte[]{1, 1, 1, 1};
        ScmAction addFile = new AddFile( "folder1",
                                         "file1.dat",
                                         content1 );
        actions.addScmAction( addFile );

        addDirectory = new AddDirectory( "folder1",
                                      "folder1_1" );
        actions.addScmAction( addDirectory );
        byte[] content2 = new byte[]{1, 0, 0, 1};
        addFile = new AddFile( "folder1/folder1_1",
                               "file1.dat",
                               content2 );
        actions.addScmAction( addFile );
        svn.execute( actions,
                     "test message" );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        svn.getContent( "folder1",
                        "file1.dat",
                        -1,
                        baos );
        assertTrue( Arrays.equals( content1,
                                   baos.toByteArray() ) );
        baos = new ByteArrayOutputStream();
        svn.getContent( "folder1/folder1_1",
                        "file1.dat",
                        -1,
                        baos );
        assertTrue( Arrays.equals( content2,
                                   baos.toByteArray() ) );

        List list = convertToStringList( svn.listEntries( "" ) );
        assertTrue( list.contains( "folder1" ) );
        assertTrue( list.contains( "folder1/folder1_1/file1.dat" ) );
        assertFalse( list.contains( "folder2/folder1/file1.dat" ) );

        // Now copy the directory
        actions = new CompositeScmAction();
        addDirectory = new AddDirectory( "",
                                      "folder2" );
        actions.addScmAction( addDirectory );
        ScmAction copyDirectory = new CopyDirectory( "folder1",
                                                     "folder2/folder1",
                                                     svn.getLatestRevision() );
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );
        byte[] content = new byte[]{1, 1, 1, 1};
        ScmAction addFile = new AddFile( "folder1",
                                         "file1.dat",
                                         content );
        actions.addScmAction( addFile );
        svn.execute( actions,
                     "test message" );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        svn.getContent( "folder1",
                        "file1.dat",
                        -1,
                        baos );
        assertTrue( Arrays.equals( content,
                                   baos.toByteArray() ) );

        List list = convertToStringList( svn.listEntries( "" ) );
        assertTrue( list.contains( "folder1" ) );
        assertTrue( list.contains( "folder1/file1.dat" ) );
        assertFalse( list.contains( "folder2/file2.dat" ) );

        // No do the file move
        actions = new CompositeScmAction();
        addDirectory = new AddDirectory( "",
                                      "folder2" );
        actions.addScmAction( addDirectory );
        MoveFile moveFile = new MoveFile( "folder1",
                                          "file1.dat",
                                          "folder2",
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );
        byte[] content = new byte[]{1, 1, 1, 1};
        ScmAction addFile = new AddFile( "folder1",
                                         "file1.dat",
View Full Code Here

                                                     "mrtrout",
                                                     "drools" );

        CompositeScmAction actions = new CompositeScmAction();

        ScmAction addDirectory = new AddDirectory( "",
                                                "folder1" );
        actions.addScmAction( addDirectory );
        byte[] content = new byte[]{1, 1, 1, 1};
        ScmAction addFile = new AddFile( "folder1",
                                         "file1.dat",
View Full Code Here

TOP

Related Classes of org.drools.scm.svn.SvnActionFactory.AddDirectory

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.