Examples of TemporaryFileManager


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

    /**
     * Test that a device can be successfully updated, written to the archive
     * and the changed device correctly read back again from the repository.
     */
    public void testUpdateDevice() throws Exception {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                // Create a temporary repository which will be deleted later.
                EclipseDeviceRepository accessor = updateHierarchy(
                        getHierarchy(), repository.getPath());

View Full Code Here

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

     * Tests that the {@link EclipseDeviceRepository#writeDeviceElements}
     * handles a device that has no custom properties
     * @throws Exception if an error occurs
     */
    public void testWriteDeviceElementsNoCustomProperties() throws Exception {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                ZipFile beforeZip = new ZipFile(repository);
                try {
                    assertNull("standard device should not exist",
View Full Code Here

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

     * @throws Exception if an error occurs
     */
    public void testWriteDeviceElementsOnlyCustomProperties()
            throws Exception {

        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                ZipFile beforeZip = new ZipFile(repository);
                try {
                    assertNull("standard device should not exist",
View Full Code Here

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

     * @throws Exception if an error occurs
     */
    public void testWriteDeviceElementsStandardAndCustomProperties()
            throws Exception {

        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                ZipFile beforeZip = new ZipFile(repository);
                try {
                    assertNull("standard NewDevice device should not exist",
View Full Code Here

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

    /**
     * Test that an added custom policy is saved to the custom file
     * @throws Exception
     */
    public void testAddCustomPolicy() throws Exception {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                // Create a temporary repository which will be deleted later.
                EclipseDeviceRepository accessor = updateHierarchy(
                        getHierarchy(), repository.getPath());

View Full Code Here

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

    /**
     * Test that definitions documents are correctly merged together.
     */
    public void testMergeDefinitionDocuments() throws Throwable {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                // Create a temporary repository which will be deleted later.
                EclipseDeviceRepository accessor = updateHierarchy(
                        getHierarchy(), repository.getPath());

View Full Code Here

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

    /**
     * Test that device documents are correctly merged together.
     */
    public void testMergeDeviceDocuments() throws Throwable {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                // Create a temporary repository which will be deleted later.
                EclipseDeviceRepository accessor = updateHierarchy(
                        getHierarchy(), repository.getPath());

View Full Code Here

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

    /**
     * Test the writing of the repository.
     */
    public void testWritingReadonlyRepository() throws Exception {
        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                // Create a temporary repository which will be deleted later.
                EclipseDeviceRepository accessor = updateHierarchy(
                        getHierarchy(), repository.getPath());

View Full Code Here

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

        // Create some new custom properties
        final Properties properties = new Properties();
        properties.setProperty(customNameKey, customNameValue);
        properties.setProperty(customDescKey, customDescValue);

        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                MDPRArchiveAccessor archiveAccessor = new MDPRArchiveAccessor(
                        repository.getPath(), transformerMetaFactory);
                final EclipseDeviceRepository writeRepository =
View Full Code Here

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

    /**
     * Test to see if the retrieval of a fallback for a particular device works.
     */
    public void testGetFallbackDeviceName() 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);

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.