Examples of TemporaryFileExecutor


Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

     */
    public void notestRemoveDevice() throws Exception {

        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                EclipseDeviceRepository accessor =
                        new EclipseDeviceRepository(repository.getPath(),
                                transformerMetaFactory, jdomFactory, true, true, null);
                try {
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

    public void testReadingEmptyRepository() throws Exception {

        TemporaryFileManager manager = new TemporaryFileManager(
                new ResourceTemporaryFileCreator(this.getClass(),
                        "repository_empty.zip"));
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                try {
                    new EclipseDeviceRepository(repository.getPath(),
                            transformerMetaFactory, jdomFactory, null);
                    fail("Expected Repository Exception (ZipExcepiton)");
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

     * Test the getProperties() method.
     */
    public void testGetProperties() throws Exception {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                EclipseDeviceRepository accessor =
                        new EclipseDeviceRepository(repository.getPath(),
                                transformerMetaFactory, jdomFactory, false, true, null);
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

            throws Throwable {

        final String[] result = new String[1];
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File file) throws Exception {
                MDPRArchiveAccessor archiveAccessor = new MDPRArchiveAccessor(
                        file.getPath(), transformerMetaFactory);
                EclipseDeviceRepository accessor =
                        new EclipseDeviceRepository(archiveAccessor,
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

     */
    public void testMoveDeviceNullDeviceArg() throws Exception {
        try {
            TemporaryFileManager manager = new TemporaryFileManager(
                    new TestDeviceRepositoryCreator());
            manager.executeWith(new TemporaryFileExecutor() {
                public void execute(File repository) throws Exception {
                    EclipseDeviceRepository accessor = new
                            EclipseDeviceRepository(repository.getPath(),
                                    transformerMetaFactory, jdomFactory, false, true, null);

View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

     */
    public void testMoveDeviceNullParentDeviceArg() throws Exception {
        try {
            TemporaryFileManager manager = new TemporaryFileManager(
                    new TestDeviceRepositoryCreator());
            manager.executeWith(new TemporaryFileExecutor() {
                public void execute(File repository) throws Exception {
                    EclipseDeviceRepository accessor = new
                            EclipseDeviceRepository(repository.getPath(),
                                    transformerMetaFactory, jdomFactory, false, true, null);

View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

       
    }
   
    public void testReadNonExistant() throws Exception {
       
        archiveFileManager.executeWith(new TemporaryFileExecutor() {
            public void execute(File temporaryFile) throws Exception {
                ZipArchive archive = new ZipArchive(temporaryFile.getPath());
                InputStream input = archive.getInputFrom("non existant file");
                if (input != null) {
                    fail("opened non existant file");
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

       
    }
   
    public void testReadNormal() throws Exception {
       
        archiveFileManager.executeWith(new TemporaryFileExecutor() {
           
            public void execute(File temporaryFile) throws Exception {
               
                ZipArchive archive = new ZipArchive(temporaryFile.getPath());
                InputStream input = archive.getInputFrom(ARCHIVE_FILE_1);
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

       
    }

    public void testWrite() throws Exception {
       
        archiveFileManager.executeWith(new TemporaryFileExecutor() {
           
            public void execute(File temporaryFile) throws Exception {
               
                String fileValue = "newly written content of file\n";
View Full Code Here

Examples of com.volantis.synergetics.testtools.io.TemporaryFileExecutor

    // todo: testCreateExists
   
    public void testCreate() throws Exception {
       
        archiveFileManager.executeWith(new TemporaryFileExecutor() {
           
            public void execute(File temporaryFile) throws Exception {
               
                String fileValue = "contents of newly created file\n";
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.