Examples of FileConfiguration


Examples of org.bukkit.configuration.file.FileConfiguration

            entities.put(id, scriptname);
        }
    }

    public static void saveEntities() {
        FileConfiguration entityScripts = DenizenAPI.getCurrentInstance().getEntities();
        entityScripts.set("entities.scripts", null);
        for (Map.Entry<UUID, String> entry: entities.entrySet()) {
            entityScripts.set("entities.scripts." + entry.getKey() + ".scriptname", entry.getValue());
        }
    }
View Full Code Here

Examples of org.bukkit.configuration.file.FileConfiguration

        if (!file.exists()) {
            plugin.saveResource("magicspells.yml", false);
            Messenger.info("magicspells.yml created.");
        }
        try {
            FileConfiguration config = new YamlConfiguration();
            config.load(file);
            setupSpells(config);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.hornetq.core.config.impl.FileConfiguration

   public void testSetGetConfigurationURL()
   {
      final String file = "ghuuhhu";

      FileConfiguration fc = new FileConfiguration();

      fc.setConfigurationUrl(file);

      Assert.assertEquals(file, fc.getConfigurationUrl());

   }
View Full Code Here

Examples of org.hornetq.core.config.impl.FileConfiguration

   // Protected ---------------------------------------------------------------------------------------------

   @Override
   protected Configuration createConfiguration() throws Exception
   {
      FileConfiguration fc = new FileConfiguration();

      fc.setConfigurationUrl("ConfigurationTest-full-config.xml");

      fc.start();

      return fc;
   }
View Full Code Here

Examples of org.hornetq.core.config.impl.FileConfiguration

      liveJMSServer.stop();
   }

   private void start() throws Exception
   {
      FileConfiguration fc = new FileConfiguration();

      fc.setConfigurationUrl("server-start-stop-config1.xml");

      fc.start();
     
      fc.setJournalDirectory(getJournalDir());
      fc.setBindingsDirectory(getBindingsDir());
      fc.setLargeMessagesDirectory(getLargeMessagesDir());

      HornetQSecurityManager sm = new HornetQSecurityManagerImpl();

      HornetQServer liveServer = new HornetQServerImpl(fc, sm);
View Full Code Here

Examples of org.jbehave.core.reporters.FilePrintStreamFactory.FileConfiguration

    @Test
    public void shouldAllowOverrideOfDefaultConfiguration(){
        // Given
        URL codeLocation = CodeLocations.codeLocationFromClass(this.getClass());
        String storyPath = "org/jbehave/examples/trader/stories/my_given.story";
        FileConfiguration configuration = new FileConfiguration("ext");
       
        // When
        FilePrintStreamFactory factory = new FilePrintStreamFactory(new StoryLocation(codeLocation, storyPath), configuration);
        assertThat(factory.configuration(), equalTo(configuration));       
        FileConfiguration newConfiguration = new FileConfiguration();
        factory.useConfiguration(newConfiguration);
       
        // Then
        assertThat(factory.configuration(), not(equalTo(configuration)));       
        assertThat(factory.configuration().toString(), containsString(FileConfiguration.EXTENSION));       
View Full Code Here

Examples of org.jbehave.core.reporters.FilePrintStreamFactory.FileConfiguration

    private void assertThatOutputNameIs(String storyPath, String outputName, FilePathResolver pathResolver) {
        // Given
        URL codeLocation = CodeLocations.codeLocationFromClass(this.getClass());
        String extension = "ext";       
        FileConfiguration configuration = (pathResolver != null ? new FileConfiguration("", extension, pathResolver) : new FileConfiguration(extension));
        // When
        FilePrintStreamFactory factory = new FilePrintStreamFactory(new StoryLocation(codeLocation, storyPath), configuration);
        // Then
        assertThat(factory.outputName(), equalTo(outputName));
    }
View Full Code Here

Examples of org.jbehave.core.reporters.FilePrintStreamFactory.FileConfiguration

    @Test(expected=PrintStreamCreationFailed.class)
    public void shouldFailIfPrintStreamCannotBeCreated(){
        // Given
        URL codeLocation = CodeLocations.codeLocationFromClass(this.getClass());
        String storyPath = "org/jbehave/examples/trader/stories/my_given.story";
        FileConfiguration configuration = new FileConfiguration("ext");
        FilePrintStreamFactory factory = new FilePrintStreamFactory(new StoryLocation(codeLocation, storyPath), configuration){
            protected File outputDirectory() {
                return new File((String)null);
            }
        };
View Full Code Here

Examples of org.jbehave.core.reporters.FilePrintStreamFactory.FileConfiguration

       
        // Then fail as expected
    }

    private void ensureOutputFileIsSame(URL codeLocation, String storyPath) {
        FileConfiguration configuration = new FileConfiguration("ext");
        FilePrintStreamFactory factory = new FilePrintStreamFactory(new StoryLocation(codeLocation, storyPath), configuration);
        factory.createPrintStream();
        File outputFile = factory.getOutputFile();
        String expected = new File(codeLocation.getFile()).getParent().replace('\\', '/') + "/" + configuration.getRelativeDirectory() + "/"
                + "org.jbehave.examples.trader.stories.my_given." + configuration.getExtension();
        assertThat(outputFile.toString().replace('\\', '/'), equalTo(expected));

    }
View Full Code Here

Examples of org.jbehave.core.reporters.FilePrintStreamFactory.FileConfiguration

    private Keywords keywords;
    private CrossReference crossReference;
    private boolean multiThreading;
   
    public StoryReporterBuilder() {
      relativeDirectory = new FileConfiguration().getRelativeDirectory();
      pathResolver = new FileConfiguration().getPathResolver();
      codeLocation = CodeLocations.codeLocationFromPath("target/classes");
      viewResources = new FreemarkerViewGenerator().defaultViewProperties();
      keywords = new LocalizedKeywords();
    }
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.