Example usage for org.apache.commons.configuration AbstractFileConfiguration getFileName

List of usage examples for org.apache.commons.configuration AbstractFileConfiguration getFileName

Introduction

In this page you can find the example usage for org.apache.commons.configuration AbstractFileConfiguration getFileName.

Prototype

public String getFileName() 

Source Link

Document

Return the name of the file.

Usage

From source file:com.yahoo.sshd.server.settings.TestOptions.java

@Test(dataProvider = "overrides")
public void testFindConfigFile(String override, String expected) throws Exception {
    SshdSettingsBuilder testBuilder = new SshdSettingsBuilder();
    Configuration config = testBuilder.findPropertiesConfiguration(override);

    AbstractFileConfiguration fileConfiguration = (AbstractFileConfiguration) config;

    // we need to create expected from a new file.
    // because it's a complete filename.
    File expectedFile = new File(expected);
    String expectedPath = "file://" + expectedFile.getAbsolutePath();
    Assert.assertEquals(fileConfiguration.getFileName(), expectedPath);
}