Package org.tmatesoft.sqljet.core.internal

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetFile


   
    @Test(expected = AssertionError.class)
    public void testOpenCreateOnly() throws Exception {
        Assert.assertNotNull(pathNew);
        Assert.assertFalse(pathNew.exists());
        final ISqlJetFile f = fileSystem.open(pathNew, SqlJetFileType.MAIN_DB, PERM_CREATE_ONLY );
        f.close();
        Assert.fail("File shouldn't be opened with permission CREATE only");
    }
View Full Code Here


    @Test(expected = AssertionError.class)
    public void testOpenCreateReadonly() throws Exception {
        Assert.assertNotNull(pathNew);
        Assert.assertFalse(pathNew.exists());
        final ISqlJetFile f = fileSystem.open(pathNew, SqlJetFileType.MAIN_DB, PERM_CREATE_READONLY );
        f.close();
        Assert.fail("File shouldn't be opened with permissions CREATE and READONLY");
    }
View Full Code Here

    @Test
    public void testOpenCreate() throws Exception {
        Assert.assertNotNull(pathNew);
        Assert.assertFalse(pathNew.exists());
        final ISqlJetFile f = fileSystem.open(pathNew, SqlJetFileType.MAIN_DB, PERM_CREATE);
        f.close();
        Assert.assertNotNull("File should be created with permission CREATE and READWRITE", f);
    }
View Full Code Here

    @Test(expected = AssertionError.class)
    public void testOpenExclusiveOnly() throws Exception {
        Assert.assertNotNull(pathNew);
        Assert.assertFalse(pathNew.exists());
        final ISqlJetFile f = fileSystem.open(pathNew, SqlJetFileType.MAIN_DB, PERM_EXCLUSIVE_ONLY );
        f.close();
        Assert.fail("File shouldn't be created with permission EXCLUSIVE only");
    }
View Full Code Here

    @Test
    public void testOpenExclusiveCreate() throws Exception {
        Assert.assertNotNull(pathNew);
        Assert.assertFalse(pathNew.exists());
        final ISqlJetFile f = fileSystem.open(pathNew, SqlJetFileType.MAIN_DB, PERM_EXCLUSIVE_CREATE);
        f.close();
        Assert.assertNotNull("File should be created with permission EXCLUSIVE, CREATE and READWRITE", f);
    }
View Full Code Here

            EasyMock.createNiceMock(ISqlJetFileSystemsManager.class);
       
        if(null!=fileSystem) return;
   
        fileSystem = EasyMock.createNiceMock(ISqlJetFileSystem.class);
        final ISqlJetFile file = EasyMock.createNiceMock(ISqlJetFile.class);
   
        /* Setup mocks rules */
       
        EasyMock.expect(fileSystem.getName()).andStubReturn(MOCK_FILE_SYSTEM);
       
View Full Code Here

   
    // open()
   
    @Test(expected = SqlJetException.class)
    public void testOpenFileNullPermNull() throws Exception {
        final ISqlJetFile f = fileSystem.open(null, null, null);
        f.close();
        Assert.fail("File shouldn't be opened without permissions");
    }
View Full Code Here

        Assert.fail("File shouldn't be opened without permissions");
    }

    @Test(expected = SqlJetException.class)
    public void testOpenFilePermNull() throws Exception {
        final ISqlJetFile f = fileSystem.open(path, null, null);
        f.close();
        Assert.fail("File shouldn't be opened without permissions");
    }
View Full Code Here

        Assert.fail("File shouldn't be opened without permissions");
    }

    @Test(expected = SqlJetException.class)
    public void testOpenFileTypeNull() throws Exception {
        final ISqlJetFile f = fileSystem.open(path, null, PERM_TEMPORARY);
        f.close();
        Assert.fail("File shouldn't be opened without permissions");
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.internal.ISqlJetFile

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.