Package com.hp.hpl.jena.eyeball.util

Examples of com.hp.hpl.jena.eyeball.util.FileInsertion


    public TestFileInsertion()
        { super( "TestFileInsertion" ); }

    @Test public void testTokenisation()
        {
        FileInsertion f = new FileInsertion();
        assertEquals( listOfStrings( "" ), f.tokenise( "" ) );
        assertEquals( listOfStrings( "spoo" ), f.tokenise( "spoo" ) );
        assertEquals( listOfStrings( "abc|@def| ghi", "|" ), f.tokenise( "abc@def ghi" ) );
        assertEquals( listOfStrings( "abc @@ def"), f.tokenise( "abc@@def" ) );
        assertEquals( listOfStrings( "@'/home/kers/included' stuff" ), f.tokenise( "@'/home/kers/included'stuff" ) );
        }
View Full Code Here


        assertEquals( listOfStrings( "@'/home/kers/included' stuff" ), f.tokenise( "@'/home/kers/included'stuff" ) );
        }
   
    @Test public void testWithoutInsertion()
        {
        FileInsertion f = new FileInsertion();
        testWithoutInsertion( f, "" );
        testWithoutInsertion( f, "spoo" );
        testWithoutInsertion( f, "!boot" );
        testWithoutInsertion( f, "'chat'@en-uk" );
        }
View Full Code Here

        testWithoutInsertion( f, "'chat'@en-uk" );
        }
   
    @Test public void testEscapeDuplicate()
        {
        FileInsertion f = new FileInsertion();
        assertEquals( "abc@def", f.insert( "abc@@def" ) );
        }
View Full Code Here

        }
   
    @Test public void testSingleFilenameWithInsertion()
        {
        FileManager fm = new FakeFileManager( "spoo", "XXX" );
        FileInsertion f = new FileInsertion( fm );
        assertEquals( "XXX", f.insert( "@'spoo'" ) );
        assertEquals( "abcXXXdefXXXghi", f.insert( "abc@'spoo'def@'spoo'ghi" ) );
        assertEquals( "abcXXXdefXXXghi", f.insert( "abc@\"spoo\"def@'spoo'ghi" ) );
        assertEquals( "abcXXXdefXXXghi", f.insert( "abc@'spoo'def@\"spoo\"ghi" ) );
        }
View Full Code Here

        }
   
    @Test public void testMultipleFilenamesWithInsertion()
        {
        FileManager fm = new FakeFileManager( "d", "Dirac" ).set( "q", "quincunx" );
        FileInsertion f = new FileInsertion( fm );
        assertEquals( "abc|Dirac|def|quincunx|ghi", f.insert( "abc|@'d'|def|@'q'|ghi" ) );
        }
View Full Code Here

            super( root );
            fm = new TestFileInsertion.FakeFileManager( name, query );
            }
       
        protected FileInsertion getFileInsertion()
            { return new FileInsertion( fm ); }
View Full Code Here

        Subclasses over-ride if they want a different file insertion (eg, for testing).
        (You don't need a new one on every call; it's just convenient in this default
        case.)
    */
    protected FileInsertion getFileInsertion()
        { return new FileInsertion(); }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.eyeball.util.FileInsertion

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.